Task Share Destination Fixes#24019
Conversation
|
@situchan @thienlnam Seems like a test is designed to expect the wrong results from Do you want me to take a look and fix that test as well to work with are newly desired results? |
Yes please, we're changing the expected functionality so we'll need to update the test as well |
Roger that, on it now |
|
@situchan @thienlnam Also updated the test to match the new functionality |
| includeThreads = false, | ||
| includeTasks = false, | ||
| includeMoneyRequests = false, | ||
| disallowNewChats = false, |
There was a problem hiding this comment.
Let's use exclude word to be consistent with others.
I suggest excludeUnknownUsers
There was a problem hiding this comment.
Agreed, changed it to your suggestion. Thanks!
There was a problem hiding this comment.
Thanks for the quick update. Also please pull main
There was a problem hiding this comment.
Thank you @situchan , done!
I pulled main before I made my PR, seems like a lot of stuff was merged afterwards
|
@Thanos30 please exclude archived workspaces |
|
Also, Concierge cannot be destination. The condition should be exactly same as Assign task option visibility in Composer App/src/pages/home/report/ReportActionCompose.js Lines 453 to 469 in 2f750ad
|
Got it, thank you! I added an extra condition on |
| (lodashGet(props.reports[reportKey], 'participantAccountIDs', []).length === 1 && | ||
| _.some(props.reports[reportKey].participantAccountIDs, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID))) |
There was a problem hiding this comment.
Make common function in ReportUtils similar to isConciergeChatReport and use it both here and ReportActionCompose.
We avoid duplicated code.
There was a problem hiding this comment.
@situchan Thank you for your feedback. Let me know what you think of the changes 🙏
| * @returns {Boolean} | ||
| */ | ||
|
|
||
| function canShareTaskInReport(report) { |
There was a problem hiding this comment.
This can be general function, not tied to task.
So let's rename it to isExpensifyChatReport
|
Last change: - ...this.getTaskOption(reportParticipants),
+ ...this.getTaskOption(), |
Whoops, sorry I missed that |
Reviewer Checklist
Screenshots/VideosWebweb1.movweb2.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
situchan
left a comment
There was a problem hiding this comment.
LGTM
@thienlnam all yours
thienlnam
left a comment
There was a problem hiding this comment.
Just a small comment, but rest is looking good!
Got it, fixing that in a minute |
|
@thienlnam Done, thanks! |
| * @param {Object} report | ||
| * @returns {Boolean} | ||
| */ | ||
|
|
| import PropTypes from 'prop-types'; | ||
| import {withOnyx} from 'react-native-onyx'; | ||
| import OptionsSelector from '../../components/OptionsSelector'; | ||
|
|
There was a problem hiding this comment.
@thienlnam sorry for the inconvenience, removed some code after the adjustments with the new functions. I thought npm run prettify would cover it. Done.
|
✋ 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/thienlnam in version: 1.3.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.51-2 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.52-0 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.52-5 🚀
|
|
Just coming from this issue where Here we filter Lines 483 to 486 in 0a7aabd |

Details
Fixing Task Share Destination code to show only chats already available.
Fixed Issues
$ #20898
PROPOSAL: #20898 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Uploading Screen Recording 2023-08-01 at 8.28.31 PM.mov…
Mobile Web - Chrome
Screen.Recording.2023-08-01.at.8.34.12.PM.mov
Mobile Web - Safari
Screen.Recording.2023-08-01.at.8.34.12.PM.mov
Desktop
iOS
Screen.Recording.2023-08-01.at.8.48.16.PM.mov
Android
Screen.Recording.2023-08-01.at.9.01.06.PM.mov