Closed izarutskaya closed 3 weeks ago
Triggered auto assignment to @dylanexpensify (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.
Edited by proposal-police: This proposal was edited at 2024-09-12 13:33:49 UTC.
Delete option is present for Title report field but unable to delete it
We should not show Delete option for title field base on this
But the following function not working properly, since we don't use any formula on the Custom name, but instead just a text without formula, the field type will be text
. So it not return true in this function
https://github.com/Expensify/App/blob/37161bc77fe9b55f4b93d2151d490f698e7adbf3/src/libs/ReportUtils.ts#L2720-L2722
Change the function to the following without checking the type
function isReportFieldOfTypeTitle(reportField: OnyxEntry<PolicyReportField>): boolean {
return reportField?.fieldID === CONST.REPORT_FIELD_TITLE_FIELD_ID;
}
Title report field remains after deleting it. This issue only happens with Title report field that is enabled by Custom report name.
We're showing the policyReportFields from policy and report
In this case, there's 1 reportField from policy and no one from report
But when users delete field, we don't clear it in policy (just clear fieldList in report)
the reportField from policy shouldn't be deletable
update isReportFieldDeletable
to
const isReportFieldFromReport = !!report?.fieldList?.[fieldKey]
const isReportFieldDeletable = reportField.deletable && !isReportFieldTitle && isReportFieldFromReport
or we can just check isReportFieldDeletable = reportField.deletable && reportField?.fieldID !== CONST.REPORT_FIELD_TITLE_FIELD_ID
If we remove reportField?.type === 'formula'
in isReportFieldOfTypeTitle
function, it can affected a lot of places
@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...
reviewing today!
@dylanexpensify Eep! 4 days overdue now. Issues have feelings too...
@dylanexpensify should we open this issue?
Job added to Upwork: https://www.upwork.com/jobs/~021838887364204259850
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (External
)
How to login to applausetester+kh010901@applause.expensifail.com? App requires me to input a verification code.
๐ฃ @ivanmaurovic7! ๐ฃ Hey, it seems we donโt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: ivanmaurovic7@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01be7ae4f41bd201bf
โ Contributor details stored successfully. Thank you for contributing to Expensify!
@dylanexpensify @c3024 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!
If the custom report name is a formula, it is shown as the report name in the header. However, when it is text, it is not shown in the header (because if it were, all reports would have the same title) and is instead displayed as a report field in the report view. This seems like expected behavior to me.
If we remove the formula
check in isReportFieldOfTypeTitle
, this behavior breaks. It will likely also break the expected behavior because this check is used in many other places. Therefore, I think checking with the field type as REPORT_FIELD_TITLE_FIELD_ID
, as suggested in @daledah's proposal, looks good to me.
๐ ๐ ๐ C+ Reviewed
Triggered auto assignment to @mjasikowski, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@mjasikowski What do you think about my proposal? Thanks
@daledah looks good, thank you! We certainly don't want to remove the formula
check at this point.
๐ฃ @c3024 ๐ An offer has been automatically sent to your Upwork account for the Reviewer role ๐ Thanks for contributing to the Expensify app!
๐ฃ @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review ๐งโ๐ป Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing ๐
pending deploy to prod then regression period
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.45-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-10-14. :confetti_ball:
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:
Coming up!
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:
- [x] [@c3024] The PR that introduced the bug has been identified. Link to the PR: #36039
- [x] [@c3024] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/36039/files#r1800964733
- [x] [@c3024] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: No discussion was started because this could not have been identified earlier.
- [x] [@c3024] Determine if we should create a regression test for this bug. Yes
- [x] [@c3024] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Payment summary:
Contributor: @daledah $250 via Upwork Contributor+: @c3024 $250 via Upwork
Please apply/request!
@daledah sent offer!
Done!
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: 9.0.33-1 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
The Title report field should disappear after deleting it.
Actual Result:
Title report field remains after deleting it. This issue only happens with Title report field that is enabled by Custom report name.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/38b64d54-7992-4617-878a-1a246f6fe938
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @dylanexpensify