App
App copied to clipboard
[$500] Room - Room with long description can not be created
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: 1.4.38-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4286969&group_by=cases:section_id&group_order=asc&group_id=229067 Email or phone of affected tester (no customers): [email protected] Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
- Log in to NewDot with a High traffic account that owns a existing Workspace
- Click on the green + button
- Click on the "Start Chat" option
- Click the tab '#Room'
- Add a room name
- Add very long description
- Finish the flow
Expected Result:
Room should be created
Actual Result:
Created Room disappears immediately / Room with long description can not be created
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [x] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/cfd9bee0-bb19-45f2-94c4-7e9ec3e60256
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~018e6835f3eb8880f2
- Upwork Job ID: 1755332022294048768
- Last Price Increase: 2024-02-07
Job added to Upwork: https://www.upwork.com/jobs/~018e6835f3eb8880f2
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External
)
Triggered auto assignment to @sakluger (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
We think that this bug might be related to #vip-vsp CC @quinthar
Not a bug this was intentional https://github.com/Expensify/App/pull/34150#issuecomment-1915928141
cc @puneetlath
Shouldn't we give an error message if the length crosses a particular value then? this is sort of crash behavior we don't want the user to face right? @ishpaul777 @puneetlath :thinking:
Please re-state the problem that we are trying to solve in this issue.
A new room fails to save if it has a long description, it will appear for a second in the UI then disappear
What is the root cause of that problem?
The endpoint returns an error and does not save the room. The room is added to the UI optimistically and when the endpoint errors it is removed < 1s later
What changes do you think we should make in order to solve the problem?
Another else if statement in the validate() function of WorkspaceNewRoomPage.js like this
else if (values.reportDescription.length > CONST.REPORT_DESCRIPTION.MAX_LENGTH) {
ErrorUtils.addErrorMessage(errors, 'reportDescription', 'Error message here');
}
Will stop the form from being able to be submitted when the descrition is too long. What alternative solutions did you explore? (Optional) None
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a room is created with a very long description, it fails without any error message.
What is the root cause of that problem?
https://github.com/Expensify/App/blob/e2b670428a07919c8a37d3f3c8cf1963ffd0297a/src/pages/workspace/WorkspaceNewRoomPage.js#L315-L315 https://github.com/Expensify/App/blob/8da7fe5a52a262ea3a18e087ff07f00dd84255de/src/CONST.ts#L105-L107
The maximum length of a room description is set to 1024 but the backend enforces a difference, lower value. This causes the front end to accept the descripiton but it's then rejected by the backend.
What changes do you think we should make in order to solve the problem?
Align the maximum length of a room description in the front end with the backend by changing the constant shown above.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
The maximum length of a room description is set to 1024 but the backend enforces a difference, lower value. This causes the front end to accept the descripiton but it's then rejected by the backend.
okay sorry I didn't understand the issue properly earlier, i think the issue is with Backend π
agree with @ishpaul777 :), but if we want to keep the backend as it is then @barros001's proposal would make sense here
Hey @puneetlath , when you have a moment can you check this one, it seems to be a Backend issue related to Room description length. Thanks!
Our back-end MAX_DESCRIPTION_LENGTH
is set to 500 characters (https://github.com/Expensify/Web-Expensify/blob/main/lib/Report.php#L704). I'll ask in Slack whether we want to shorten the front-end maximum or increase the back-end max: https://expensify.slack.com/archives/C066HJM2CAZ/p1707859355835099
Triggered auto assignment to Contributor Plus for review of internal employee PR - @mollfpr (Internal
)
We'd like to go with the longer 1024 limit, which means this is a BE change. I've applied the internal label and will make the change myself since we're just changing the value of a const.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External
)
Sorry for the back and forth, but I was wrong. We previously decided that 500 is the standard length for fields like this, as documented in Stack Overflow: https://stackoverflowteams.com/c/expensify/questions/17034.
That means that we should update the front-end value to 500 to match the back-end value. I'll update the original description appropriately.
By the way, @ishpaul777 - do you know if you're properly set up as a C+ in Github? The issue keeps trying to assign other C+ people even though you're already assigned. I can check internally to see what the issue is, but thought you might know.
Upwork job price has been updated to $250
Proposal
Please re-state the problem that we are trying to solve in this issue.
Room with long description can not be created
What is the root cause of that problem?
Currently the length is set to 1024
https://github.com/Expensify/App/blob/8da7fe5a52a262ea3a18e087ff07f00dd84255de/src/CONST.ts#L105-L107
What changes do you think we should make in order to solve the problem?
Change it to 500
as the backend expects the same
What alternative solutions did you explore? (Optional)
N/A
Also, I'm changing the price to $250 since this is a simple change.
I am temporarily removed from c+ GH team as i am starting to work on track expense project soon https://expensify.slack.com/archives/C02NK2DQWUX/p1707854919280159
But since this is simple change and i was assigned before i think i have the bandwidth to handle this
Proposal
Please re-state the problem that we are trying to solve in this issue.
Room - Room with long description can not be created
What is the root cause of that problem?
The value is 1024
.
https://github.com/Expensify/App/blob/d50d603d7a9065a747d7ea957b69c886f86d29f7/src/CONST.ts#L105-L107
What changes do you think we should make in order to solve the problem?
We need to update the value of REPORT_DESCRIPTION
from 1024
to 500
as stated in BE the value is 500
, so we need to update frontend as well.
What alternative solutions did you explore? (Optional)
N/A
Thanks for your proposals @godofoutcasts94 @GandalfGwaihir but your proposals are similar to @barros001's proposal. (i know the exact value was not added but it was not known until now)
@barros001's proposal LGTM!
π π π C+ reviewed
π π π
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Thanks @situchan
π£ @barros001 π 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 π
PR is up for review. Just missing Android and iOS native videos as I'll have to rebuild them and it takes a little while.
Edit: all videos uploaded.
this should be ready for payment @sakluger (bumping as the automation failed to add awaiting payment label)
Summarizing payment on this issue:
Contributor: @barros001 $250, paid via Upwork Contributor+: @ishpaul777 $250, sent offer via Upwork, please let me know once you've accepted the offer