Skip to content

[HOLD for payment 2024-02-07] Confirmation popover missing for Cancel Task #35035

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.30-0
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
Expensify/Expensify Issue URL:
Issue reported by: @Santhosh-Sellavel
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706040447440989

Action Performed:

  1. create a task
  2. Opent the task created
  3. Press on 3 dot on the upper right side and click on the option "delete task"

Expected Result:

Confirmation popup appears

Actual Result:

no confirmation pop up

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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Recording.1706.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 24, 2024
  2. melvin-bot commented on Jan 24, 2024

    @melvin-bot

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

  3. DylanDylann commented on Jan 24, 2024

    @DylanDylann
    Contributor

    Proposal

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

    no confirmation pop up

    What is the root cause of that problem?

    We don't have logic to implement it

    onSelected: Session.checkIfActionIsAllowed(() => Task.deleteTask(props.reportID, props.report.reportName, props.report.stateNum, props.report.statusNum)),

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

    First we need to introduce new state

        const [isDeleteModalVisible, setIsDeleteModalVisible] = useState(false);
    

    and new function

    const deleteTaskAndHideModal = useCallback(() => {
            const deleteTask = Session.checkIfActionIsAllowed(() => Task.deleteTask(props.reportID, props.report.reportName, props.report.stateNum, props.report.statusNum))
            deleteTask()
            setIsDeleteModalVisible(false);
        }, [props.report.reportName, props.report.stateNum, props.report.statusNum, props.reportID]);
    

    And add ConfirmModal COmponent

    <ConfirmModal
                    title={translate('task.deleteTask')}
                    isVisible={isDeleteModalVisible}
                    onConfirm={deleteTaskAndHideModal}
                    onCancel={() => setIsDeleteModalVisible(false)}
                    prompt={translate('task.deleteTaskPrompt')}    // Should add in translation 
                    confirmText={translate('common.delete')}
                    cancelText={translate('common.cancel')}
                    danger
                />
    

    Then when clicking delete task we will update this state to true

    onSelected: Session.checkIfActionIsAllowed(() => Task.deleteTask(props.reportID, props.report.reportName, props.report.stateNum, props.report.statusNum)),

    onSelected: () => setIsDeleteModalVisible(true),
    

    We also need to close the modal if the current user loses permission to delete the task

    const canModifyTask = Task.canModifyTask(props.report, props.session.accountID, lodashGet(props.rootParentReportPolicy, 'role', ''));
        useEffect(() => {
            if (canModifyTask) {
                return;
            }
    
            setIsDeleteModalVisible(false);
        }, [canModifyTask]);
    

    What alternative solutions did you explore? (Optional)

    We can consider to also display modal when user click mark as incomplete task in the header

  4. Santhosh-Sellavel commented on Jan 24, 2024

    @Santhosh-Sellavel
    Collaborator

    cc: @neonbhai here is the issue for the PR please update it in description

  5. neonbhai commented on Jan 24, 2024

    @neonbhai
    Contributor

    @Santhosh-Sellavel Thank you. PR linked!

  6. melvin-bot commented on Jan 29, 2024

    @melvin-bot

    @jasperhuangg, @Santhosh-Sellavel Eep! 4 days overdue now. Issues have feelings too...

  7. jasperhuangg commented on Jan 29, 2024

    @jasperhuangg
    Contributor

    We merged the contributor's PR that fixes this, not overdue!

  8. 11 remaining items

  9. laurenreidexpensify commented on Feb 8, 2024

    @laurenreidexpensify
    Contributor

    @Santhosh-Sellavel please complete checklist thanks

  10. Santhosh-Sellavel commented on Feb 10, 2024

    @Santhosh-Sellavel
    Collaborator

    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:

    cc: @jasperhuangg Let me know if you differ from above

  11. neonbhai commented on Feb 13, 2024

    @neonbhai
    Contributor

    @laurenreidexpensify hi, I think I'll be owed compensation as PR author for this issue. Please take a look 🙇

  12. neonbhai commented on Feb 16, 2024

    @neonbhai
    Contributor

    @laurenreidexpensify friendly bump on this!

  13. neonbhai commented on Feb 20, 2024

    @neonbhai
    Contributor

    @laurenreidexpensify please take a look when you can!

  14. laurenreidexpensify commented on Feb 21, 2024

    @laurenreidexpensify
    Contributor
  15. neonbhai commented on Feb 21, 2024

    @neonbhai
    Contributor

    @laurenreidexpensify hi, could you please invite me to the job? As I'll have to buy connects to apply!

    Upwork profile: https://www.upwork.com/freelancers/~01b1623e7bd66df3df

  16. laurenreidexpensify commented on Feb 22, 2024

    @laurenreidexpensify
    Contributor

    @neonbhai sent!

  17. laurenreidexpensify commented on Feb 22, 2024

    @laurenreidexpensify
    Contributor

    Payment Summary:

    Contributor @neonbhai $500 paid in Upwork

  18. Santhosh-Sellavel commented on May 22, 2024

    @Santhosh-Sellavel
    Collaborator

    Requested on ND

  19. JmillsExpensify commented on May 31, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @Santhosh-Sellavel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions