fix: policy id shows as domain card description#48779
Conversation
|
@dominictb can we get this in review today, please? Thanks! |
|
@trjExpensify All the code changes have been implemented. I am adding the missing videos. |
|
I encountered an error when running the Android app, will update PR once it is fixed. |
|
@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] |
| const match = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME); | ||
| if (match) { |
There was a problem hiding this comment.
@mountiny Should we use bank field to check? If possible, I think it will be simpler

There was a problem hiding this comment.
We already implemented isExpensifyCard function to check this
There was a problem hiding this comment.
I think we need to change this, it does not have to be only Expensify cards here, I think we need to check if this feed is a workspace feed or not.
If yes, use workspace name
There was a problem hiding this comment.
I think we need to change this, it does not have to be only Expensify cards here, I think we need to check if this feed is a workspace feed or not.
If yes, use workspace name
@mountiny Please elaborate this point. Thanks!
| } | ||
|
|
||
| function getDescriptionForPolicyDomainCard(domainName: string) { | ||
| const match = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME); |
There was a problem hiding this comment.
So this would be more like isWorkspaceFeed if the domain name matches the expensify-policy<policyID>.exfy format
| const match = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME); | ||
| if (match) { |
There was a problem hiding this comment.
I think we need to change this, it does not have to be only Expensify cards here, I think we need to check if this feed is a workspace feed or not.
If yes, use workspace name
|
Are we ready for a re-review? |
mountiny
left a comment
There was a problem hiding this comment.
@dominictb can you please update these small changes, otherwise looks good
|
@dominictb Please create a physical card instead of mock data BUG: Your change works with the mock data but fails with the real data because the the letter in policyID is lowercase Screen.Recording.2024-09-11.at.17.32.26.mov |
|
@DylanDylann Could you retry? I turned the |
Reviewer Checklist
Screenshots/Videos |
The requested changes were addressed
|
✋ 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/MariaHCD in version: 9.0.34-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.34-3 🚀
|






Details
Fixed Issues
$ #48749
PROPOSAL: #48749 (comment)
Tests
Test case 1 (Use the mock data)
Fill the
${policyID}by any existed policyID value.Test case 2
Verify that under Assigned cards section, the card description shows the workspace name
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Android: mWeb Chrome
Screen.Recording.2024-09-09.at.23.10.15.mov
iOS: Native
Screen.Recording.2024-09-09.at.23.05.52.mov
iOS: mWeb Safari
Screen.Recording.2024-09-09.at.22.53.22.mov
MacOS: Chrome / Safari
Screen.Recording.2024-09-09.at.22.37.36.mov
MacOS: Desktop
Screen.Recording.2024-09-09.at.22.43.53.mov