-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2022-05-20][$250] New room - Not able to create a new room, error message appears #8534
Comments
Triggered auto assignment to @francoisl ( |
Triggered auto assignment to @jliexpensify ( |
I think that the backend must be sending the data in the form of an array earlier which was working just fine - App/src/libs/actions/Report.js Line 1526 in 0596be5
But now, you can see the logged response below (we're getting an object with key : report_SOME-ID) I think we it should be fixed at the backend, but if for some reason we can't then I propose this fix - App/src/libs/actions/Report.js Lines 1518 to 1525 in 0596be5
Onyx.set(ONYXKEYS.IS_LOADING_CREATE_POLICY_ROOM, true);
+ let reportID;
return API.CreatePolicyRoom({policyID, reportName, visibility})
.then((response) => {
if (response.jsonCode !== 200) {
Growl.error(response.message);
return;
}
+ reportID = response.reportID;
return fetchChatReportsByIDs([response.reportID]);
})
.then(() => {
if (!reportID) {
Log.error('Unable to grab policy room after creation', reportID);
return;
} |
Posted! Internal - https://www.upwork.com/ab/applicants/1513707338062458880/job-details Invited @thesahindia as the bug reporter |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Triggered auto assignment to @AndrewGable ( |
@thesahindia you found the cause. But I think we should fix it here by correctly accessing the App/src/libs/actions/Report.js Line 1526 in 0596be5
Thoughts? |
bump ^^ @thesahindia |
The object key keeps changing( reportID is not the key but the "report_" + value of reportID is ) so to do that we need to extract the key or the simple way would be to just use the reportID that we get in response here App/src/libs/actions/Report.js Lines 1518 to 1525 in 0596be5
I had mentioned this here #8534 (comment) |
PROPOSALWe can extract the key from the response as below
Instead of |
@aneequeahmad since you're a new contributor, you're limited to only one job at a time. So I'd suggest that you complete the PR Expensify/expensify-common#441 as soon as possible. After which, you may work on multiple jobs. Thanks! |
@thesahindia I'm sure we can figure something out using underscore.js. Please let me know when you submit an updated proposal, thanks! |
Updated ProposalWe can use .then((response) => {
const {reportID} = _.values(response)[0]; |
@AndrewGable I like @thesahindia's proposal. Changes will be made over here - App/src/libs/actions/Report.js Lines 1526 to 1527 in 0596be5
🎀 👀 🎀 C+ reviewed |
@thesahindia a suggestion when posting an updated proposal -
I hope this makes sense, thanks! |
📣 @thesahindia You have been assigned to this job by @AndrewGable! |
Looking forward to the PR 👍 |
PR is up. |
Not overdue Melv! |
Not overdue Melvin |
Issue not reproducible during KI retests. (First week) |
Previous created job was closed, so re-created: https://www.upwork.com/ab/applicants/1528581043536789504/job-details @rushatgabhane and @thesahindia - have re-invited you. Thanks! |
Paid @rushatgabhane , will pay $500 to @thesahindia once he accepts. Cheers! |
Issue not reproducible during KI retests. (Second week) |
Accepted the offer, good to go 🚀 |
Paid @thesahindia and closing this GH. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
New room must be created when I click create room
Actual Result:
New room is not created and I see error message
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.52-0
Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/162206860-40cf5b13-0f65-476c-b274-047d6fe1060a.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause @thesahindia
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1648760293684219
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: