-
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
[HOLD for payment 2023-09-21] [$1000] App allows task title update for completed task using deep link and throws error on update #22451
Comments
Triggered auto assignment to @twisterdotcom ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.App allows task title update for completed task using deep link and throws error on update What is the root cause of that problem?In the TaskTitlePage component, we haven't have logic to check whether the task is complete/cancelled before showing the page. This issue is also reproducible in edit Task description, edit Task assignee and edit Task share destination pages. What changes do you think we should make in order to solve the problem?We should add logic into the TaskTitlePage component so that if the Task is not open (means is completed or cancelled), then we can either navigate back or show not show page. We can put those logic into an HOC/hook to reuse it in other 3 pages above. I imagine it almost same with this existing HOC withReportOrNotFound |
ProposalPlease re-state the problem that we are trying to solve in this issue.App allows task title update for completed task using deep link and throws error on update What is the root cause of that problem?We are not having any check (whether task is open) when we are opening What changes do you think we should make in order to solve the problem?We can wrap the
For this we are using this method -
This can be used in This has advantage over We can also use early return in case the Task is completed and render nothing at all, with this approach we are not being verbose to user that why we are not showing the page. UPDATE🚨 What alternative solutions did you explore? (Optional)If we don't want to wrap the
By using this solution we can't provide detailed info to user why he/she can't access the page. |
Wow, good find. |
Job added to Upwork: https://www.upwork.com/jobs/~01df4c0b6543fe49a8 |
Current assignee @twisterdotcom is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - User able to add or edit assignee even if task was completed What is the root cause of that problem?We are not adding any check on who can edit assignee. What changes do you think we should make in order to solve the problem?First we need to add check if Task is not completed yet and users who are not allowed to edit assignee can access that page and can edit Task. We need to add other checks here too !Task.isTaskAssigneeOrTaskOwner ---To check if current user is task assignee or task owner if not then user will not be able to access that page. After adding these checks we can either dismiss modal, show hmmm it's not here page or return early from editTaskAndNavigate. What alternative solutions did you explore? (Optional)We can do this for title and description pages too. |
ProposalPlease re-state the problem that we are trying to solve in this issue.user able to add or edit assignee even if task was completed What is the root cause of that problem?We don't have any checks to dismiss task assignee modal or do nothing in What changes do you think we should make in order to solve the problem?After we change the permission, we can display not found page for
Because we display not found page for these page, we also should subscribe What alternative solutions did you explore? (Optional)We also can add the check
Line 308 in 38890e2
|
@eVoloshchak - any of these proposals look good? |
ProposalPlease re-state the problem that we are trying to solve in this issue.App allows task title update for completed task using deep link and throws error on update What is the root cause of that problem?We allow the Sub-Report deep link routes to be handled by their respective component pages, which means that users will be able to access pages which they shouldn't: Lines 2292 to 2300 in 2d05d2e
While coming from a deeplink, or manually entering the link in the search bar and press enter, the following happens: What changes do you think we should make in order to solve the problem?I think we should prevent users from navigating to pages which they shouldn't be allowed to(such as navigating to /login while already logged in - a general example). To do that, we should:
let route = ReportUtils.getRouteFromLink(url);
let { reportID, isSubReportPageRoute } = ReportUtils.getReportIDFromLink(url);
if (isSubReportPageRoute) {
// Prevent Sub-Report deep link to routes with no access
const report = ReportUtils.getReport(reportID);
if (ReportUtils.isCompletedTaskReport(report) && route.endsWith('/assignee')) {
route = route.slice(0, -9);
} else {
// We allow the Sub-Report deep link to routes with access to be handled by their respective component pages
reportID = ''
}
} Previous code is a restrict_access.mp4 |
Bump @eVoloshchak. I'll reassign to another C+ tomorrow if you're a bit busy, don't worry. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Thank you for the proposals, everyone! I think we should proceed with @Nodebrute's proposal, it is adding an important check if user has permission to edit/view the task title/description in addition to checking if task is completed. We can use
🎀👀🎀 C+ reviewed! UPD: there's already an issue User able to add or edit assignee even if task was completed, we would be resolving that too with this proposal |
📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
Thank you @thienlnam .
Please confirm. |
Yup sounds good, thanks for sticking with these issues |
@thienlnam I think we are missing some case here.
Solution: use Can you check my comment #22451 (comment) and #22451 (comment) And my proposal |
Hi @thienlnam, melvin bot has provided me with 50$ offer even though it is raised in july 😅. Can you check once you are available? |
@dhanashree-sawant - I've paid you for $250. |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-09-21. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
^^ @sophiepintoraetz @eVoloshchak @thienlnam Can we proceed further on this. |
Cool so: Payouts due: Issue Reporter: $250 done Eligible for 50% #urgency bonus? Y |
@BhuvaneshPatil - for future reference, please wait until 7 days has passed before bumping - this has a weekly priority so while we endeavour to pay out on time, it's not always the case. |
thanks @sophiepintoraetz for mentioning. |
|
Regression Test Proposal
Do we agree 👍 or 👎 |
@sophiepintoraetz, please don't close an issue if the BZ checklist hasn't been completed yet |
Requested the payment via NewDot |
$1,500 payment approved for @eVoloshchak based on BZ summary. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Once task is completed, app should not allow to edit task title by deep link
Actual Result:
App allows to edit task title using deep link even after task is marked as completed and if edited using the link, app displays red dot in LHN on task report
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.38-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
red.dot.for.task.update.already.completed.mov
Recording.1218.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688742180722969
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: