-
Notifications
You must be signed in to change notification settings - Fork 3k
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 cannot create task for new user via [] method #41171
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb-chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
src/libs/actions/Report.ts
Outdated
@@ -3673,6 +3673,30 @@ function setGroupDraft(newGroupDraft: Partial<NewGroupChatDraft>) { | |||
Onyx.merge(ONYXKEYS.NEW_GROUP_CHAT_DRAFT, newGroupDraft); | |||
} | |||
|
|||
function setTaskDataForNewAssingee(assigneeLogin: string, accountID: number | undefined = undefined) { |
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.
Move the function to src/libs/actions/Task.ts
src/libs/actions/Report.ts
Outdated
@@ -3673,6 +3673,30 @@ function setGroupDraft(newGroupDraft: Partial<NewGroupChatDraft>) { | |||
Onyx.merge(ONYXKEYS.NEW_GROUP_CHAT_DRAFT, newGroupDraft); | |||
} | |||
|
|||
function setTaskDataForNewAssingee(assigneeLogin: string, accountID: number | undefined = undefined) { |
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.
function setTaskDataForNewAssingee(assigneeLogin: string, accountID: number | undefined = undefined) { | |
function setNewOptimisticAssignee(assigneeLogin: string, assigneeAccountID: number) { |
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.
Or setOptimisticReportAndPersonalDetailsForNewAssignee
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.
@s77rt What do you think about setOptimisticDataForNewAssignee
?
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.
Let's not use data
because it does not tell us anything and we would have to read the function to understand what data
means
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.
Thanks, I think setNewOptimisticAssignee
is fine.
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.
@s77rt I updated.
src/libs/actions/Task.ts
Outdated
@@ -650,6 +650,27 @@ function setAssigneeChatReport(chatReport: OnyxTypes.Report) { | |||
Onyx.merge(ONYXKEYS.TASK, {assigneeChatReport: chatReport}); | |||
} | |||
|
|||
function setNewOptimisticAssignee(assigneeLogin: string, assigneeAccountID: number | undefined = undefined) { |
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.
function setNewOptimisticAssignee(assigneeLogin: string, assigneeAccountID: number | undefined = undefined) { | |
function setNewOptimisticAssignee(assigneeLogin: string, assigneeAccountID: number) { |
NAB let's make the prop required and generate the account id before calling this function
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.
@s77rt I updated.
✋ 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 production by https://github.com/marcaaron in version: 1.4.71-6 🚀
|
Details
Fix cannot create task for new user via [] method
Fixed Issues
$ #40518
PROPOSAL: #40518 (comment)
Tests
Offline tests
Same as above
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
Screen.Recording.2024-04-28.at.22.40.40.mov
Android: mWeb Chrome
Screen.Recording.2024-04-28.at.22.23.27.mov
iOS: Native
Screen.Recording.2024-04-28.at.22.41.39.mov
iOS: mWeb Safari
Screen.Recording.2024-04-28.at.22.22.28.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-28.at.22.20.42.mov
MacOS: Desktop
Screen.Recording.2024-04-28.at.22.43.20.mov