You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-10] [$500] Workspace - Opening rate unit workspace page on login displays '0.000' and changing value does not work #26131
Please re-state the problem that we are trying to solve in this issue.
Opening rate unit workspace page on login displays '0.000' and changing value does not work
What is the root cause of that problem?
The rate data is fetched using Policy.openWorkspaceReimburseViewaction. This action is triggered when we access Reimbursements page.
When we access rates page with link itself bypassing reimbursement page, this action is not triggered, thus making rate data not available for us.
Also another problem is that if you access it in offline mode or slow internet connection, the data won't be loaded and it shows 0, even if data is loaded if you are in rates page, it won't be updated in TextInput
What changes do you think we should make in order to solve the problem?
To fetch data when rates page is directly accessed, we can apply something like this, which checks if we have rates data and if not it will try to fetch it:
We should update inputs when rate data is fetched. I couldn't find any way of modifying input's value, since inputs are using inputID and not value and onValueChange. But I hope there is a way, or we can just use value and onValueChange props.
The another problem with this approach is that when user is modifying inputs and data is fetched it will interrupt user and set input value itself confusing user.
I think we should show some type of loading indicator since user should be aware of that the input data is not available yet but they can change it if they want.
We can maybe utilize pendingActions here by passing reimbursementAccount.isLoading state
However, when accessing the URL directly, fetchData is not called.
What changes do you think we should make in order to solve the problem?
In WorkspaceRateAndUnitPage.js:
We should load the data on mount, but only if it's not already loading. When going through the normal route via Workspaces, there is no guarantee that loading has finished, so we need to make this conditional.
changed the title [-]Workspace - Opening rate unit workspace page on login displays '0.000' and changing value does not work[/-][+][$500] Workspace - Opening rate unit workspace page on login displays '0.000' and changing value does not work[/+]on Aug 30, 2023
I'm confused... @dhanashree-sawant can you link the job where it says I need to pay? For whatever reason I don't see you assigned to the original job and it's closed now
Activity
melvin-bot commentedon Aug 28, 2023
Triggered auto assignment to @kevinksullivan (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 28, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)alitoshmatov commentedon Aug 29, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Opening rate unit workspace page on login displays '0.000' and changing value does not work
What is the root cause of that problem?
The rate data is fetched using
Policy.openWorkspaceReimburseViewaction. This action is triggered when we access Reimbursements page.When we access rates page with link itself bypassing reimbursement page, this action is not triggered, thus making rate data not available for us.
Also another problem is that if you access it in offline mode or slow internet connection, the data won't be loaded and it shows 0, even if data is loaded if you are in rates page, it won't be updated in TextInput
What changes do you think we should make in order to solve the problem?
To fetch data when rates page is directly accessed, we can apply something like this, which checks if we have rates data and if not it will try to fetch it:
We should update inputs when rate data is fetched. I couldn't find any way of modifying input's value, since inputs are using
inputIDand notvalueandonValueChange. But I hope there is a way, or we can just usevalueandonValueChangeprops.The another problem with this approach is that when user is modifying inputs and data is fetched it will interrupt user and set input value itself confusing user.
I think we should show some type of loading indicator since user should be aware of that the input data is not available yet but they can change it if they want.
We can maybe utilize pendingActions here by passing
reimbursementAccount.isLoadingstateApp/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.js
Line 129 in a997962
What alternative solutions did you explore? (Optional)
samh-nl commentedon Aug 29, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Opening rate unit workspace page on login displays '0.000' and changing value does not work
What is the root cause of that problem?
The reimbursement rate information is loaded in the previous page in
fetchData:App/src/pages/workspace/reimburse/WorkspaceReimburseView.js
Lines 112 to 113 in fd755ee
However, when accessing the URL directly,
fetchDatais not called.What changes do you think we should make in order to solve the problem?
In WorkspaceRateAndUnitPage.js:
defaultValue.render() { ... + if (this.props.isReimbursementAccountLoading) { + return <FullscreenLoadingIndicator />; + } ... }What alternative solutions did you explore? (Optional)
N/A
[-]Workspace - Opening rate unit workspace page on login displays '0.000' and changing value does not work[/-][+][$500] Workspace - Opening rate unit workspace page on login displays '0.000' and changing value does not work[/+]melvin-bot commentedon Aug 30, 2023
Job added to Upwork: https://www.upwork.com/jobs/~014ad1f796cb41f15e
melvin-bot commentedon Aug 30, 2023
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Aug 30, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)62 remaining items
melvin-bot commentedon Oct 30, 2023
@cristipaval, @kevinksullivan, @rushatgabhane, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
cristipaval commentedon Oct 30, 2023
Are we good to close this one?
cristipaval commentedon Nov 2, 2023
friendly bump @kevinksullivan
Is @dhanashree-sawant paid alreayd? Can we close this one?
dhanashree-sawant commentedon Nov 3, 2023
@kevinksullivan has sent me the offer but milestone approval is left.
cristipaval commentedon Nov 6, 2023
@kevinksullivan has been OOO, I think he'll be back today. I pinged him internally.
kevinksullivan commentedon Nov 7, 2023
I'm confused... @dhanashree-sawant can you link the job where it says I need to pay? For whatever reason I don't see you assigned to the original job and it's closed now
https://www.upwork.com/jobs/~014ad1f796cb41f15e
I am not seeing a separate one either. If you can link me to it that would be great. Otherwise I can create a new one.
dhanashree-sawant commentedon Nov 7, 2023
This is the message room for that job, not sure if this link will work for you or not but I have sent 'Hi' on upwork in that room
https://www.upwork.com/ab/messages/rooms/room_9b3ffa8158877d7ec9f9b8c997f4fa36?sidebar=true
kevinksullivan commentedon Nov 7, 2023
all set