-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Move task reportActions onto the task report #20014
Conversation
@mollfpr @hayata-suenaga One of you needs to 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] |
Could I please get an initial code review here? These are holding on the backend changes https://github.com/Expensify/Auth/pull/7999 which are ready but I don't want to send those out until this App PR is also ready to send out |
The code looks good to me, but I didn't get the time to test it. I'll try it and review it again in the morning. |
Thanks - you might have to do offline tests for now since the back-end will still save the messages on the parent report. Once we confirm that generally works, I will merge the BE PR and you can do a full run through with online tests |
we don't have to put hold on the title? |
are we also moving the task actions already in the database from parent report to the task 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.
As I also mentioned in the previous comments, I don't know how PRs related to changes in the data schema are coordinated.
but the App code LGTM! I haven't tested this PR so let's wait for @mollfpr to complete the tests 🙇
@thienlnam @hayata-suenaga It tests well for offline. |
Cool cool, merging the auth PR, will let you know when it's live |
@hayata-suenaga Yup! I just merged the auth PR, and added hold to title until it's live |
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.
All yours @hayata-suenaga
Just added one small line change to also resolve this bug
|
Thanks @thienlnam for the fix! I didn't expect we could fix the issue in this PR 😅 Just need to resolve the failing lint, and I will approve it again. |
heh yeah just a small change luckily - updated! |
cc @hayata-suenaga Could you please approve/merge when you get the chance? |
|
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.
Looks good and tests well thanks!
function completeTask(taskReportID, parentReportID, taskTitle) { | ||
const message = `Completed task: ${taskTitle}`; | ||
function completeTask(taskReportID, taskTitle) { | ||
const message = `completed task: ${taskTitle}`; |
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.
NAB: I preferred sentence case but I guess we had a good reason to change it?
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.
Yup, keeping it consistent with manual requests
Move task reportActions onto the task report (cherry picked from commit a61b74a)
…-20014 🍒 Cherry pick PR #20014 to staging 🍒
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
const isTaskCompleted = | ||
(props.taskReport.stateNum === CONST.REPORT.STATE_NUM.SUBMITTED && props.taskReport.statusNum === CONST.REPORT.STATUS.APPROVED) || | ||
(props.action.childStateNum === CONST.REPORT.STATE_NUM.SUBMITTED && props.action.childStatusNum === CONST.REPORT.STATUS.APPROVED); | ||
const isTaskCompleted = props.taskReport |
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.
#21924 (comment) issue happened using props.taskReport
key: `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`, | ||
value: { | ||
lastVisibleActionCreated: completedTaskReportAction.created, | ||
lastMessageText: message, | ||
lastActorEmail: completedTaskReportAction.actorEmail, | ||
}, | ||
}, | ||
{ | ||
onyxMethod: Onyx.METHOD.MERGE, | ||
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, |
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.
The task report is a child, whenever it's updated we should also update the parent.
Details
Fixes this deploy blocker #20285
Also a fix for patching the difference between reportActions showing up on the task report instead of the parent report. The back-end changes are already merged so this should get resolved as well
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/285951
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Offline tests
Same as 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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screen.Recording.2023-06-01.at.4.57.02.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-06-01.at.4.58.11.PM.mov
Mobile Web - Safari
Desktop
Screen.Recording.2023-06-01.at.5.00.26.PM.mov
iOS
Android