fix: rule approvers (category / tag) should be able to submit reports on workspaces with prevent self-approvals enabled#58660
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
friendly bump @DylanDylann |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-03.at.15.28.18.movAndroid: mWeb ChromeScreen.Recording.2025-04-03.at.15.30.05.moviOS: NativeScreen.Recording.2025-04-03.at.15.24.54.moviOS: mWeb SafariScreen.Recording.2025-04-03.at.15.18.28.movMacOS: Chrome / SafariScreen.Recording.2025-04-03.at.15.15.46.movMacOS: DesktopScreen.Recording.2025-04-03.at.15.21.37.mov |
|
Bug (Out of scope): The optimistic action on the next step is wrong
Screen.Recording.2025-03-25.at.11.44.55.movSolution:Line 1671 in dc8eb79 @nkdengineer Let's address it here |
|
@nkdengineer Please update the test step to verfiy all changes here
|
|
Thanks for your review @DylanDylann. I updated and tested it well. Please check agian |
Co-authored-by: DylanDylann <141406735+DylanDylann@users.noreply.github.com>
Co-authored-by: DylanDylann <141406735+DylanDylann@users.noreply.github.com>
|
@nkdengineer Failed test |
|
@DylanDylann It's fixed now. |
|
@Beamanator Kindly bump |
|
Looking! |
Beamanator
left a comment
There was a problem hiding this comment.
Looking great! Thanks for the fix!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.1.25-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.25-4 🚀
|
| if (ruleApprovers.length > 0 && ruleApprovers.at(0) === employeeLogin && policy?.preventSelfApproval) { | ||
| ruleApprovers.shift(); | ||
| } |
There was a problem hiding this comment.
Coming from #78928, this logic did not work well when preventSelfApproval is false. In getApprovalChain , we always remove the rule approver if the approver is also the submitter and same had to be done here.
Explanation of Change
Fixed Issues
$ #58254
PROPOSAL: #58254 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-03-19.at.21.41.01.mov
Android: mWeb Chrome
Screen.Recording.2025-03-19.at.21.42.48.mov
iOS: Native
Screen.Recording.2025-03-19.at.21.44.02.mov
iOS: mWeb Safari
Screen.Recording.2025-03-19.at.21.45.18.mov
MacOS: Chrome / Safari
Screen.Recording.2025-03-19.at.21.47.57.mov
MacOS: Desktop
Screen.Recording.2025-03-19.at.21.48.57.mov