-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix/39049 shortcut self dm task #39215
Fix/39049 shortcut self dm task #39215
Conversation
@Santhosh-Sellavel 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] |
775f17b
to
52e1364
Compare
src/libs/actions/Task.ts
Outdated
@@ -709,14 +718,14 @@ function setParentReportID(parentReportID: string) { | |||
/** | |||
* Clears out the task info from the store and navigates to the NewTaskDetails page | |||
*/ | |||
function clearOutTaskInfoAndNavigate(reportID: string, accountID = 0) { | |||
function clearOutTaskInfoAndNavigate(reportID: string, report: OnyxEntry<OnyxTypes.Report>, accountID = 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry but why do we need the both report and reportid cant we just use report.reportID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually sometime report is null but reportID can be task.shareDestination
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find related discussion here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense! but lets call it chatReport instead
src/libs/actions/Task.ts
Outdated
clearOutTaskInfo(); | ||
if (reportID && reportID !== '0') { | ||
setParentReportID(reportID); | ||
} | ||
if (accountID > 0) { | ||
const accountLogin = allPersonalDetails?.[accountID]?.login ?? ''; | ||
setAssigneeValue(accountLogin, accountID, reportID); | ||
setAssigneeValue(accountLogin, accountID, reportID, report); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
Reviewer Checklist
Screenshots/VideosAndroid: NativeRecord_2024-03-29-04-13-38.mp4Android: mWeb ChromeRecord_2024-03-29-04-17-12.mp4iOS: NativeScreen.Recording.2024-03-29.at.4.09.27.AM.moviOS: mWeb SafariScreen.Recording.2024-03-29.at.4.06.57.AM.movMacOS: Chrome / SafariScreen.Recording.2024-03-29.at.3.56.13.AM.movMacOS: DesktopScreen.Recording.2024-03-29.at.3.56.13.AM.mov |
@yuwenmemon looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
Tests were passing |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Fix/39049 shortcut self dm task (cherry picked from commit 196d245)
#39260 issue from this PR. The assignee chat report is wrong. |
@@ -178,7 +178,7 @@ function FloatingActionButtonAndPopover(props) { | |||
IOU.startMoneyRequest(CONST.IOU.TYPE.SEND, props.quickAction.chatReportID); | |||
return; | |||
case CONST.QUICK_ACTIONS.ASSIGN_TASK: | |||
Task.clearOutTaskInfoAndNavigate(props.quickAction.chatReportID, _.get(props.quickAction, 'targetAccountID', 0)); | |||
Task.clearOutTaskInfoAndNavigate(props.quickAction.chatReportID, quickActionReport, _.get(props.quickAction, 'targetAccountID', 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should had passed quickActionReport
as undefined:
// The second parameter of clearOutTaskInfoAndNavigate is the chat report or DM report // between the user and the person to whom the task is assigned. // Since chatReportID isn't stored in NVP_QUICK_ACTION_GLOBAL_CREATE, we set // it to undefined. This will make setAssigneeValue to search for the correct report.
This caused #44388
Details
Fixed Issues
$#39049
PROPOSAL: #39049 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
WhatsApp.Video.2024-03-28.at.12.47.03.AM.mp4
Android: mWeb Chrome
WhatsApp.Video.2024-03-28.at.12.47.05.AM.mp4
iOS: Native
ios-3.mp4
iOS: mWeb Safari
ios-3-web.mp4
MacOS: Chrome / Safari
2f93d786-c077-4943-a9b7-00433e040ee6.mp4
MacOS: Desktop
d2854dfd-f72e-407a-b7c0-8a9489909b44.mp4