Skip to content

1054 task list complete the todo of calculating the duration of parent tasks dynamically#22950

Merged
thijsoo merged 3 commits intofeature/task-list-phase-2from
1054-task-list-complete-the-todo-of-calculating-the-duration-of-parent-tasks-dynamically
Feb 5, 2026
Merged

1054 task list complete the todo of calculating the duration of parent tasks dynamically#22950
thijsoo merged 3 commits intofeature/task-list-phase-2from
1054-task-list-complete-the-todo-of-calculating-the-duration-of-parent-tasks-dynamically

Conversation

@leonidasmi
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi commented Feb 5, 2026

Context

  • Instead of hardcoding the duration for parent tasks (for now that's only the Improve your content's SEO ones), we want to dynamically calculate it based on the duration of their incomplete child tasks.

Summary

This PR can be summarized in the following changelog entry:

  • Dynamically calculates the duration of parent tasks.

Relevant technical choices:

  • Added is_completed attribute to task classes in order to be able to cache potentially expensive calculations of whether a task is complete or not. Right now, it's only used in the improved content SEO child task.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Have at least 2 posts and 1 page modified the last 2 months with a keyphrase.
  • Let's say for now that both posts and the page have a GOOD SEO score and run the /get_tasks GET request
    • The duration for the parent improve-content-seo-post and the parent improve-content-seo-page task is 0 (because all child tasks are completed)
  • Now make one post and the page to have a bad or ok SEO score
    • The duration for the parent improve-content-seo-post is 10 minutes (which is the sum of the incomplete child tasks) and the parent improve-content-seo-page task is 10 (which is the sum of the incomplete child tasks)
  • Now make the other post too to have a bad or ok SEO score
    • The duration for the parent improve-content-seo-post is now 20 minutes (which is the sum of the incomplete child tasks again)

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • Check the output of the /get_tasks request and compare it with the output without this PR. The only thing that might change in the duration of parent tasks, as described above
    • Please also test with having different completed states for the tasks, especially the parent and child tasks of the improved content SEO ones. Every time you change the completed state for a task, check both with this PR and without to verify that there is no regression.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.
  • I have run grunt build:images and commited the results, if my PR introduces new images or SVGs.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Feb 5, 2026
@leonidasmi leonidasmi added this to the feature/task-list-phase-2 milestone Feb 5, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 5, 2026

Pull Request Test Coverage Report for Build 825ac6c6e368c03da2cab36c2b01e55e9c990a68

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 52.994%

Totals Coverage Status
Change from base Build c07d9fe4383d595266c3387cf13f444058c9bcf9: -0.5%
Covered Lines: 32558
Relevant Lines: 61471

💛 - Coveralls

@leonidasmi leonidasmi marked this pull request as ready for review February 5, 2026 10:55
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@thijsoo thijsoo merged commit 45c2641 into feature/task-list-phase-2 Feb 5, 2026
28 checks passed
@thijsoo thijsoo deleted the 1054-task-list-complete-the-todo-of-calculating-the-duration-of-parent-tasks-dynamically branch February 5, 2026 12:57
@leonidasmi leonidasmi mentioned this pull request Feb 18, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants