Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
For some type of suggested tasks (create new short / long post, update core) we use year and week as part of their ID - this way we can generate new tasks of the same type periodically and also prevent user to do the same task infinite number of times during the same week (ie to create long / short repeatedly).
For #163 I changed format of the
update-core
task to include year and week, but I haven't updated all the checks properly - so theupdate-core
task is added to the local (suggested) tasks list again when the next week starts. It is not visible to the user (it is not displayed in the widget) but upon completion 2 update tasks would be struck through and user would get 2 points.On the other side, create new short / long post had a check if completed task(s) was generated within the current week, so points are awarded correctly, but with the same problem of task(s) of the same type being internally added when new week starts.
I have looked into several ways on how to fix this and the least invasive and IMO the best approach is to:
update-core
tasks if they were generated in the current week (like we had for create post tasks)Summary
This PR can be summarized in the following changelog entry:
Remove duplicate weekly suggested tasks.
Quality assurance