-
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
Handle deleted reports for Quick Actions #41474
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
816308e
Use random report if the original one is missing
Gonals 8563915
add message
Gonals 1493562
get skipConfirmation in participants step
Gonals c640bc6
Display message
Gonals f195ecd
cleanup
Gonals b6e1cef
Spanish
Gonals 2fe5979
prettier
Gonals 7419763
display report name
Gonals ef90be5
Merge branch 'main' into alberto-deletedChat
Gonals f9eab94
update copies
Gonals 459f299
lint
Gonals 17f12d2
Display for tasks too
Gonals f4e94b7
prettier
Gonals 620f3f6
uneeded translation param
Gonals 00e5f49
bunch of unneeded imports
Gonals 60e2781
Merge branch 'main' into alberto-deletedChat
Gonals 644a2ed
pass correct param
Gonals File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -661,6 +661,7 @@ function setAssigneeValue( | |
shareToReportID?: string, | ||
chatReport?: OnyxEntry<OnyxTypes.Report>, | ||
isCurrentUser = false, | ||
skipShareDestination = false, | ||
): OnyxEntry<OnyxTypes.Report> | undefined { | ||
let report: OnyxEntry<OnyxTypes.Report> | undefined = chatReport; | ||
if (!isCurrentUser) { | ||
|
@@ -703,7 +704,7 @@ function setAssigneeValue( | |
|
||
// If there is no share destination set, automatically set it to the assignee chat report | ||
// This allows for a much quicker process when creating a new task and is likely the desired share destination most times | ||
if (!shareToReportID) { | ||
if (!shareToReportID && !skipShareDestination) { | ||
setShareDestinationValue(report?.reportID ?? ''); | ||
} | ||
} | ||
|
@@ -735,7 +736,7 @@ function clearOutTaskInfoAndNavigate(reportID?: string, chatReport?: OnyxEntry<O | |
} | ||
if (accountID > 0) { | ||
const accountLogin = allPersonalDetails?.[accountID]?.login ?? ''; | ||
setAssigneeValue(accountLogin, accountID, reportID, chatReport); | ||
setAssigneeValue(accountLogin, accountID, reportID, chatReport, false, skipConfirmation); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should had checked if |
||
} | ||
Navigation.navigate(ROUTES.NEW_TASK_DETAILS); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I may be missing something here but as
shareToReportID
will be empty in our case, will this not work without the need forskipShareDestination
?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.
Ah, not quite. If
skipShareDestination
is set, we do NOT want to populate this, as it populates by default to the user's chat, which is not what we want in this flow