[HOLD for payment 2024-11-14] [$250] Report Field- Report fields values do not update on system message until refresh the page
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.41-10 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause - Internal Team
Action Performed:
Preconditions: Existing workspace with report fields enabled and report fields set up
- Navigate to workspace chat
- Create new manual expense
- Open the expense and submit it
- Change Description
- Change any of the report fields value
- Notice the system messages for the changes
- Refresh the page and notice the change in system message
Expected Result:
Report fields values update shown on system message instantly
Actual Result:
Report fields values update doesn't shown on system message instantly until refreshed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/ed7153d4-bfc3-4fad-a52f-38536739781f
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021841468586674370606
- Upwork Job ID: 1841468586674370606
- Last Price Increase: 2024-10-02
- Automatic offers:
- nkdengineer | Contributor | 104262442
Issue Owner
Current Issue Owner: @sonialiap
Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@sonialiap FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report fields values do not update on system message until refresh the page
What is the root cause of that problem?
When we edit the report field, BE doesn't return the report field in response and we also don't create the optimistic action for the change field action.
What changes do you think we should make in order to solve the problem?
In updateReportField function, we should create an optimistic change field action follow the action that BE returns and reset it in failure data or set an error. We also need to send reportActionID of the optimistic change field action to the payload of Report_SetFields API then BE can use this ID to generate the change field action from BE.
https://github.com/Expensify/App/blob/7dde09e01e77ba55a79d043847b7ff86c5c1d1fd/src/libs/actions/Report.ts#L1907
What alternative solutions did you explore? (Optional)
Job added to Upwork: https://www.upwork.com/jobs/~021841468586674370606
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)
@nkdengineer proposal looks good to me. Also requires fix in BE πππ C+ reviewed
Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @nkdengineer π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
I'll raise PR today
@sonialiap, @Gonals, @aimane-chnaif, @nkdengineer Huh... This is 4 days overdue. Who can take care of this?
@Gonals please help to fix the BE bug and implement the required BE change in my proposal. Currently, I don't see any action after updating report fields and reload. Btw please send me an example of change_field action to fix on FE
Currently working on higher priority travel stuff! It'll still take me a few days to get to this, sorry!
PR for the backend in place @nkdengineer.
In Newdot, we only change one field at a time, but, in the backend, we handle this like it could potentially be more than one, so we need to pass the optimisticActionID as an array.
The backend expects an array called reportFieldsActionIDs in the same shape as reportFields:
reportFields: JSON.stringify({[fieldKey]: reportField}),
reportFieldsActionIDs: JSON.stringify({[fieldKey]: reportFieldActionID}),
Once the frontend PR is ready, let me know and I'll test both of them together
@sonialiap, @Gonals, @aimane-chnaif, @nkdengineer 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@Gonals Thanks for your information, will raise the FE PR soon.
@Gonals Here is the FE PR. Once you have tested this completely, I will complete the test step and videos.
Thanks! I'll test tomorrow morning!
@sonialiap, @Gonals, @aimane-chnaif, @nkdengineer 10 days overdue. I'm getting more depressed than Marvin.
Backend seems to be working and returning the Onyx update correctly. There seems to be a bug in the frontend where the backend-returned reportAction is not displayed, but that should be easy to figure out and fix after the backend merges @nkdengineer
@sonialiap @Gonals @aimane-chnaif @nkdengineer this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@sonialiap, @Gonals, @aimane-chnaif, @nkdengineer 12 days overdue. Walking. Toward. The. Light...
@Gonals what is deploy status of backend PR?
Receive optimistic action IDs for report setField actions Expensify/Web-Expensify#43900
Merged, not yet on Staging. Should deploy to staging sometime today
@sonialiap, @Gonals, @aimane-chnaif, @nkdengineer Huh... This is 4 days overdue. Who can take care of this?
@Gonals any update here
Backend should be deployed π
@sonialiap, @Gonals, @aimane-chnaif, @nkdengineer 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
waiting for frontend PR from @nkdengineer
@Gonals While testing, I found a problem, BE returns message of the change field action as empty which causes it is marked as deleted and disappears after the API is complete
https://github.com/Expensify/App/pull/50710 @aimane-chnaif The PR is ready.