Tasks from deleted pages still appearing in task report
Asked by Rob Seiberlich:

Anyone know why tasks from deleted pages would still appear in the Task Report? When I try to remove them or at least mark them as completed there is an error (likely because the page it is linking to doesn't exist). However, we can't remove these tasks. Ideas?


Answers:
author: Sabine Winkler
body: Hi Rob,

in Version 5.4.2, installed version I tested your scenario and the tasks were deleted after page removal. Hmmm. What version do you use? One suggestion to try - REST API \[1\]
\<th\>

|--------|-------------------------------|---------------------------------------------------------------------|
| GET    | `/rest/mywork/task`           | Queries the complete list of tasks the user logged into Confluence. |
| DELETE | `/rest/mywork/task/<task ID>` | Deletes a task by its task ID.                                      |
| POST   | `/rest/mywork/task`           | Adds a new task and creates an ID for the task.                     |

Take a REST client (browser plugin like Postman) and try to delete them. You need to add request header for

* Authorization (should be automatically added by the REST plugin if you are logged in)
* Content-Type: application/json
* Accept: application/json

Example:

1. Get the tasks using GET http://\<domain:port\>/\<context\>/rest/mywork/latest/task

2. Delete task with ID 77: DELETE http://\<domain:port\>/\<context\>/rest/mywork/latest/task/77

Maybe this helps,  
Sabine

\[1\] <https://developer.atlassian.com/display/CONFDEV/Creating+a+Confluence+Task+Plugin+with+REST#CreatingaConfluenceTaskPluginwithREST-Step2.AddRESTcallsinjs/tutorial-confluence-tasks.js>

comments: author: Rob Seiberlich
body: Sabine,

Thanks for this insight. When I pulled up the task list through the API, the deleted tasks and duplicated tasks did not appear. However, these eroneous tasks still do appear on the Confluence Task Report page. I'm not sure if this is an error with the Dyanamic Task List macro or what the issues is. Any ideas?


author: Sabine Winkler
body: Hi Rob,

if you cannot get the duplicates or "delete" by using the REST API, this sounds like they do not exist anymore in the DB. Can you check this on DB level?

To have a clear understanding:

what do you mean by task report page - this plugin \[1\]? If so, here is the ondemand documentation page \[2\]. Take a note on this issue \[3\] - might this relate to your Confluence behaviour?

Within the issue it is written:

*This fix will prevent duplicate tasks from being created, but will not remove existing duplicates. That is a separate task tracked by [CONF-33903](https://jira.atlassian.com/browse/CONF-33903 "Upgrade task to clean up duplicate task entries").*

If not, please provide information on Confluence version and the plugin you are using.

HTH, Sabine

\[1\] [](https://confluence.atlassian.com/display/DOC/Task+Report+Macro)<https://confluence.atlassian.com/display/DOC/Task+Report+Macro>

\[2\] [](https://confluence.atlassian.com/display/AOD/Task+Report+Macro)<https://confluence.atlassian.com/display/AOD/Task+Report+Macro>

\[3\] [](https://jira.atlassian.com/browse/CONF-33886)<https://jira.atlassian.com/browse/CONF-33886>


author: Sabine Winkler
body: Hi Rob,

the issue is solved for soon coming version 5.5.3 - the latest official release of Confluence is 5.5.2 \[1\]. Maybe this fix will help to solve your problem. Otherwise, raising a ticket might be good at this point.

So, finally I hope you will get some help from the experts soon.

Please mark a comment as answer.

Thx, Sabine

\[1\] <https://confluence.atlassian.com/display/DOC/Confluence+Release+Notes#ConfluenceReleaseNotes-Confluence5releasenotes>


author: Rob Seiberlich
body: Yes, I'm referring to the Task Report macro. The issue that was sited in the Jira ticket seemed related to our issue in that when pages were moved, that's when the issue occured. However, many of our tasks don't have dates (some do) and we are still getting this issue. Additionally, some tasks were deleted from the pages that were moved yet the tasks still appear.

The Jira ticket you referenced says "resolved" and this is still open for us. I raised a Jira ticket with the details.


author: Palletfly_jack
body: I am having this issue now

comments: author: Tamimi
body: Hey! I was wondering if you are still having the same issue? I am facing this issue and attempted [@Sabine Winkler](/t5/user/viewprofilepage/user-id/664667) recommended fix with no luck.


author: Palletfly_jack
body: Yes. Still having the issue.


author: Tamimi
body: Have you attempted to use the REST API to query/delete the tasks? One thing I realized when I queried the tasks is the Tasks from deleted pages still appearing in task report were duplicated with different statuses; one was completed and the other incomplete. I am still having the same issue on the tasks report...

What options have you attempted to solve this I can try it out on my end to see if it works...


author: Tamimi
body: Can you attempt the following steps and confirm if it resolves your issue

1. Create a new, blank page.
2. Copy the content of the affected page that is causing the duplicated tasks, and paste into the new page.
3. Delete the affected page.
4. Rename the new page, so it uses the name of the deleted one.

Apparently its a bug in confluence cloud that you will have to raise a support ticket for since we dont have access to our instance's DB


Tags: cloud