Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Add an endpoint and method for actioning tasks #7746

Merged
merged 6 commits into from
Oct 5, 2021
Merged

Add an endpoint and method for actioning tasks #7746

merged 6 commits into from
Oct 5, 2021

Conversation

joshuatf
Copy link
Contributor

@joshuatf joshuatf commented Oct 4, 2021

Fixes #7742

Adds an endpoint for actioning tasks.
Also fixes up Marketing completion logic.

Screenshots

Screen Shot 2021-10-04 at 5 06 08 PM

Detailed test instructions:

  1. Install a couple marketing extensions, but not all.
  2. Delete the woocommerce_task_list_tracked_completed_actions option.
  3. Navigate to the task list and note it is not yet marked complete.
  4. Install a marketing extension via the task list.
  5. Note the list is now marked complete and the woocommerce_task_list_tracked_completed_actions contains an array with marketing.
  6. Install all marketing extensions.
  7. Delete the woocommerce_task_list_tracked_completed_actions option.
  8. Note the list is still marked complete since all extensions are installed.

Copy link
Contributor

@louwie17 louwie17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this @joshuatf, this tested well and changes look good, I like the mark_actioned functionality.

} );

yield actionTaskSuccess(
possiblyPruneTaskData( task, [ 'isDismissed', 'isSnoozed' ] )
Copy link
Contributor

@louwie17 louwie17 Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh one comment I forgot, we should only list isActioned in this array, you can remove the isDismissed and isSnoozed.
cc @joshuatf

@joshuatf joshuatf merged commit 39ff565 into main Oct 5, 2021
@joshuatf joshuatf deleted the fix/7742 branch October 5, 2021 17:07
ObliviousHarmony pushed a commit to woocommerce/woocommerce that referenced this pull request Mar 18, 2022
…ce-admin#7746)

* Add checks for actioned task status

* Update completion logic for task

* Add rest route for actioning tasks

* Add action in data store for actioning tasks

* Add test for actioning task

* Only prune isActioned from task data
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Marketing task prematurely marked complete
2 participants