-
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 2024-06-13] [$250] IOU – Previous Expense report title is returned, if save the title as empty #42525
Comments
Triggered auto assignment to @bfitzexpensify ( |
@bfitzexpensify 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 |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Expense report title doesn't throw error when we save it with empty string What is the root cause of that problem?For report fields, we check if the type of App/src/pages/EditReportFieldPage.tsx Lines 128 to 133 in 2c9cc0a
Now this is required prop is passed down to the App/src/pages/EditReportFieldText.tsx Line 38 in 2c9cc0a
This will set the error only when But for all the Hence the assertion for What changes do you think we should make in order to solve the problem?We should instead check for the So the updated code would be: {(reportField.type === 'text' || isReportFieldTitle) && (
<EditReportFieldText
fieldName={Str.UCFirst(reportField.name)}
fieldKey={fieldKey}
fieldValue={fieldValue}
isRequired={reportField.fieldID === CONST.REPORT_FIELD_TITLE_FIELD_ID} Note
What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~011ce4e42d36033b48 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.expense report title allows saving empty empty title What is the root cause of that problem?The title field is displayed if According to this comment, the title is editable only if deletable is true, as shown here. Therefore, the title field should be required if it is not disabled. We can use App/src/pages/EditReportFieldPage.tsx Lines 128 to 135 in 2c9cc0a
What changes do you think we should make in order to solve the problem?
Optional: we can make the same change for the date field as well |
ProposalPlease re-state the problem that we are trying to solve in this issue.The expense report title doesn't generate an error if saved with a blank string. What is the root cause of that problem?App/src/pages/EditReportFieldPage.tsx Line 133 in 2c9cc0a
App/src/pages/EditReportFieldPage.tsx Line 143 in 2c9cc0a
At these instances, an incorrect condition is employed, resulting in the inadvertent passing of "isRequired: false" to EditReportFieldText What changes do you think we should make in order to solve the problem?App/src/pages/EditReportFieldPage.tsx Line 133 in 2c9cc0a
App/src/pages/EditReportFieldPage.tsx Line 143 in 2c9cc0a
In these places, we ought to utilize isReportFieldDeletable that is defined above like this
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.We do not throw error even when we try to save a empty string for What is the root cause of that problem?We decide if we should allow empty string to be stored based on the condition App/src/pages/EditReportFieldPage.tsx Lines 128 to 135 in 2c9cc0a
But here, the condition for that What changes do you think we should make in order to solve the problem?As every report Field (text, drop-down, date), have their respective fields and the value of App/src/pages/EditReportFieldPage.tsx Line 74 in 2c9cc0a
So the updated code would be: {(reportField.type === 'text' || isReportFieldTitle) && (
<EditReportFieldText
fieldName={Str.UCFirst(reportField.name)}
fieldKey={fieldKey}
fieldValue={fieldValue}
isRequired={isReportFieldTitle} // we updated this value
onSubmit={handleReportFieldChange}
/> This way we do not check the unnecessary What alternative solutions did you explore? (Optional) |
This comment was marked as duplicate.
This comment was marked as duplicate.
I would like to hear your opinion about my proposal. I believe the title field should be required if it is not disabled, |
@parasharrajat , App/src/pages/EditReportFieldPage.tsx Line 96 in 2c9cc0a
I think my proposal is the most complete one here, as we only rely on Hence we only want to make the input as required if it is so can you please rereview the proposal ? |
@parasharrajat It seems we have a problem, the auto assignment isn't triggered |
@codinggeek2023 It is for now but in future, there might be custom fields here.
@cretadn22 First the assigned Engineer will review the proposal.
@abzokhattab I didn't understand this. title field is supposed to be always required. |
Indeed that is my point, there are custom text fields even now: Above So to be very specific to Do let me know if you still have any doubts on this @parasharrajat :) |
Ok. Thanks for bringing this up. I still think that checking for deletable is more systematic even though it is true just like we are still passing this value for all text fields even if it is always true. Also, How is your proposal different from the one above you? I know that it has more details and explanations but the main logic is similar. I can update the original post to mention that your proposal also works but I can't say that the other one doesn't and let the Engineer decide it. |
yeah that will be alright, also I think you should post the C+ reviewed label again, engineer wasn't assigned here |
@parasharrajat There are no engineer is assigned |
As I saw in other issues, @MelvinBot will assign an engineer after this label 🎀 👀 🎀 C+ reviewed. But this issue is exceptional |
Let me fix that. |
@cretadn22 's proposal looks good to me. We can use the existing check that the field is deletable when it is not reportTitleField. @codinggeek2023 brings up a point that every text field in the app currently is deletable so we don't need to include that check and we can only check for whether the field is IMO, Checking for both deletable and This is the only difference in @codinggeek2023's proposal rest is the same as @cretadn22's proposal. Order-wise, @cretadn22's proposal comes before @codinggeek2023's proposal. Suggestion: @cretadn22 Please try to be more detailed about the root cause for future proposals. It is important to explain why for each solution. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I believe it would be beneficial to include @allroundexperts in this discussion, as he was the one who implemented this feature. cc @cristipaval @parasharrajat Please let me know if you have any further questions. |
📣 @cretadn22 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Why Overdue, Melv? 🙄 |
@parasharrajat The PR is created #42731 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-06-13. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payment summary: $250 for @parasharrajat for C+ work to be paid via NewDot manual request @parasharrajat, please complete the BZ checklist - thank you! |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Steps
Do you agree 👍 or 👎 ? |
Those steps look great, thank you. Proposed they be added in https://github.com/Expensify/Expensify/issues/404906. We're all done here, thanks everyone. |
Payment requested as per #42525 (comment) |
$250 approved for @parasharrajat |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.75-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/4569904
Email or phone of affected tester (no customers): applausetester+jp_e_category_1@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Unable to save empty Expense report title
Actual Result:
Previous Expense report title is returned, if save the title as empty
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6489433_1716470839877.Report_title.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @bfitzexpensifyThe text was updated successfully, but these errors were encountered: