Skip to content
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-08-03] [$1000] IOS - The title field is cleared when the Confirm task button is pressed #22078

Closed
1 of 6 tasks
kbecciv opened this issue Jul 2, 2023 · 61 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 2, 2023

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:

  1. Login to New Expensify on an iOS handset
  2. Click on + icon
  3. Click on assign task
  4. Enter title and click on next
  5. Enter an assignee
  6. Click on Confirm task

Expected Result:

The title field should not be cleared

Actual Result:

The title field is cleared

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.34-1
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

title-cleared.1.MP4
ios.ass.task.0107.mp4

Expensify/Expensify Issue URL:
Issue reported by: @aman-atg
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688216349574539

[View all open jobs on GitHub](https://github.com/Expensify/App/issues?q=is%3Aopen+is% 3Aissue+label%3A%22Help+Wanted%22)

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f1a312f3e2545b22
  • Upwork Job ID: 1676161673601695744
  • Last Price Increase: 2023-07-11
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 2, 2023

Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jul 2, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@aman-atg
Copy link
Contributor

aman-atg commented Jul 3, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The title field is cleared when the Confirm task button is pressed

What is the root cause of that problem?

The root cause of the problem is the usage of clearOutTaskInfo here which makes the props.task empty for a few secs.

What changes do you think we should make in order to solve the problem?

We can just remove this line of code which will fix the issue.

@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 4, 2023
@melvin-bot melvin-bot bot changed the title IOS - The title field is cleared when the Confirm task button is pressed [$1000] IOS - The title field is cleared when the Confirm task button is pressed Jul 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01f1a312f3e2545b22

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 4, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (External)

@alitoshmatov
Copy link
Contributor

alitoshmatov commented Jul 4, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

IOS - The title field is cleared when the Confirm task button is pressed

What is the root cause of that problem?

Before dismissing modal clearOutTaskInfo() is called, and dismissing modal is not happening instantly, that's why we can see result of clearOutTaskInfo function

What changes do you think we should make in order to solve the problem?

We can call clearOutTaskInfo when new task component unmounts, this way we make sure that task gets cleared out only when component is removed. We remove clearOutTaskInfo from createTaskAndNavigate function

function NewTaskPage(props) {

Like this

    useEffect(() => clearOutTaskInfo, []);

What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jul 4, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The title field is cleared

What is the root cause of that problem?

We're clearing the task info here after confirming. The screen transition takes some time so we can see the values are cleared.

What changes do you think we should make in order to solve the problem?

We should run the clearOutTaskInfo inside InteractionManager.runAfterInteractions so it only clears the value after the screen transition completes.

What alternative solutions did you explore? (Optional)

Both Title and Description will be benefit from the same fix as well.

Another approach is to:

  • Remove the clearOutTaskInfo in here
  • define a new ref shouldClearOutTaskInfoOnUnmount in the NewTaskPage
const shouldClearOutTaskInfoOnUnmount = React.useRef(false);
  • set it to true when confirming
  • on component unmount, check if shouldClearOutTaskInfoOnUnmount.current is true, if yes, clear the task values
useEffect(() => {
        return () => {
            if (shouldClearOutTaskInfoOnUnmount.current) {
                TaskUtils.clearOutTaskInfo();
            }
        }
    }, []);

If we don't use the ref, the task values will be cleared also when going back to previous page, which is not desirable.

@melvin-bot melvin-bot bot added the Overdue label Jul 5, 2023
@laurenreidexpensify
Copy link
Contributor

@0xmiroslav what do you think about these two proposals ^^

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 6, 2023
@laurenreidexpensify
Copy link
Contributor

@0xmiroslav bump on proposal review, thanks

@melvin-bot melvin-bot bot removed the Overdue label Jul 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@laurenreidexpensify
Copy link
Contributor

Messaged @0xmiroslav in Slack :)

@melvin-bot melvin-bot bot added the Overdue label Jul 14, 2023
@0xmiros
Copy link
Contributor

0xmiros commented Jul 16, 2023

@dukenv0307's alternative solution looks good to me.
@dukenv0307 can you please find out all occurrences where similar issue happens?
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Jul 16, 2023

Triggered auto assignment to @robertjchen, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jul 16, 2023

@robertjchen @laurenreidexpensify @0xmiroslav this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@robertjchen
Copy link
Contributor

Awaiting updated proposal w/ all occurrences where the similar issue happens per: #22078 (comment)

@laurenreidexpensify laurenreidexpensify added Daily KSv2 and removed Weekly KSv2 labels Aug 8, 2023
@aman-atg
Copy link
Contributor

Bug reporter payment has already been handled in #23294

@laurenreidexpensify I think the original reporter should have been paid here as I reported the issue earlier.

@melvin-bot melvin-bot bot added the Overdue label Aug 10, 2023
@robertjchen
Copy link
Contributor

Thanks for organizing all the details, we'll review this! 👀

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 10, 2023
@robertjchen
Copy link
Contributor

Still getting around to evaluating this, thanks for everyone's patience! 🙏

@melvin-bot melvin-bot bot removed the Overdue label Aug 14, 2023
@dukenv0307
Copy link
Contributor

@robertjchen Bump

@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@laurenreidexpensify
Copy link
Contributor

@robertjchen have you had a chance to review this? thanks

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2023
@dukenv0307
Copy link
Contributor

@robertjchen Any update here?

@robertjchen
Copy link
Contributor

Appreciate your patience, circling back to this and will respond before end of day.

@robertjchen
Copy link
Contributor

robertjchen commented Aug 23, 2023

Okay, my analysis on the situation is:

cc: @laurenreidexpensify for final confirmation and next steps! 👍

@situchan
Copy link
Contributor

@robertjchen what about me for reviewing 2nd PR? I took over based on #22078 (comment)

@robertjchen
Copy link
Contributor

@situchan Updated my comment! 👍

@melvin-bot melvin-bot bot added the Overdue label Aug 25, 2023
@robertjchen
Copy link
Contributor

@laurenreidexpensify let me know if you have any questions!

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

  • $250 - Bug Report @aman-atg - payment issued in Upwork (original job post)
  • $1500 - Contributor - @dukenv0307 - payment issued in Upwork for job (original job post)
  • $1500 - C+ review, offer sent to @0xmiroslav in Upwork (new job post)
  • $1000 - discretionary bonus, offer sent to @dukenv0307 in Upwork (new job post)
  • $1000 - discretionary bonus, offer sent to @situchan in Upwork (new job post)

@0xmiroslav can you confirm the regression checklist steps?

@0xmiros
Copy link
Contributor

0xmiros commented Aug 27, 2023

@laurenreidexpensify can you please send offer to https://www.upwork.com/freelancers/~01cf406998cdcfc7ae?
Discussion: https://expensify.slack.com/archives/C01SKUP7QR0/p1692226249296529?thread_ts=1691559426.466079&cid=C01SKUP7QR0

@0xmiros
Copy link
Contributor

0xmiros commented Aug 27, 2023

No PR caused regression. Original issue was minor UI bug, though root cause was a bit critical.
I propose regression test for #23294 instead of this GH as they have similar root cause.

Regression Test Proposal

  1. In any task report with description set, click on + and click Assign task
  2. Write any title, keep description empty and click next
  3. Close Confirm task modal
  4. Click on task description on current task report
  5. Verify that description input is prefilled correctly

@melvin-bot melvin-bot bot added the Overdue label Aug 29, 2023
@laurenreidexpensify
Copy link
Contributor

@0xmiroslav offer sent 👍

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@laurenreidexpensify
Copy link
Contributor

Payments have all been issued, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants