List all unchecked tasks in a space

Hello,
we are using confluence 5.1.2 to manage our meeting notes. We also use the inline task list feature to create and assign tasks.
Im trying to get a list of all the unfished / unchecked tasks in a certain space.

The Usermacro i did so far:

## Macroname: ShowTaskList
## Body Processing: Escapes
## @noparams

<table border = "1">
<tr>
<td>Pagelink</td>
</tr>


#foreach($page in $space.getHomePage().getDescendents())

	#foreach($label in $page.getLabels() )
		#if($label.getName() == 'protokoll')
			<tr>
			<td>
			<a href="$page.getUrlPath()">$page.getTitle()</a>

			$page.getBodyAsString()
			</td>
			</tr>
		#end
	#end
#end

</table>

I can get the body of all meeting notes in a certain space with this macro but i was unable to filter the output for the unsfinished tasks.

The output i like to generate is the unfinished task with the assgined person and the row of the table containing that task.

Regards,
Robin

2 answers

1 accepted

I finally finished my plugin. You can find the code here:

https://bitbucket.org/robingauss/confluence-inline-tasklist-overview

You will need to modify the code to search for the right protocoll structure.

Regards,
Robin

Robin, very excited to have found your plugin. But I must admit I do not understand how to install it. Any advice would be greatly appreciatted. Also, if your comoftable releaseing it I bet there a ton of people willing to pay for this. You might have a small window as I bet atlassian will bake this into confluence directly at some point.

Hello David,
it's quite difficult to install this plugin if you're not familiar with the atlassian sdk. I released the source code only because the code needs some modifications in order to work with a specific protocol layout.
In the current form the tasks have to be in a table with a 2 column layout, where the 2nd column holds the tasks.

I added a compiled plugin to my bitbucket repo for people using this layout:

https://bitbucket.org/robingauss/confluence-inline-tasklist-overview/downloads/Inline-Task-Overview-1.5.jar

I will also add some more informations there.

I'm not willing to release this as a commerical plugin because i don't have the time to maintain this project.

Regards,
Robin

Thanks for posting the jar. I'll give it a shot. I'm assuming that by two column layout you mean page layout, not a 2 column table on a single page.

No i mean an usual table.

Hi Robin,

I couldn't get this to work for my tasks. I guess it has something to do with your expected 2 column table layout.

I forked your project at https://bitbucket.org/davidturvey/confluence-inline-tasklist-overview . This version just dumps contents of each task onto a one column table. It doesn't use any special layout.

Thanks for writing your project. I don't think i would have figured any of this out without your code as a starting point.

David

@David Turvey I don't suppose you could create a jar that I could upload or otherwise provide instructions on how to install your forked version? BTW - I had the same problem with Robin's version. It did report on tasks but only from one page, seemingly random - even though many pages had the tasks in a similar 2 column format.

Edit - nevermind. Found your download David. Although it is reporting the same way Robin's did only in one column. THat is that it only reports tasks from one page. The same one Robin's reported from

@David Kraljic , which version of confluence are you using? I have only tested with 5.1. The plugin relies on the task list format posted in Ryan Goodwins comment. I look for <ac:task-list elements> and extract the contents of the <ac:task-body> elements found within. Use "Tools > View storage format" on the pages that don't work to check they match this format. If you are still having problems send me a copy of your storage format output and i'll have a look. We can discuss this further via the issue tracker on my bitbucket repository rather than clog up the comment sectionhere.

Hi Robin,

I set up a test page with 3 tasks assigned to various users and saved the page. I then checked off one of the tasks and selected Tools > View Storage Format. This is the resulting data:

&lt;p&gt;macro task list unchecked test&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ac:task-list&gt;
&lt;ac:task&gt;
&lt;ac:task-id&gt;7&lt;/ac:task-id&gt;
&lt;ac:task-status&gt;incomplete&lt;/ac:task-status&gt;
&lt;ac:task-body&gt;&lt;span&gt;&lt;ac:link&gt;&lt;ri:user ri:username="ryan@localhost.com" /&gt;&lt;/ac:link&gt; some task&lt;/span&gt;&lt;/ac:task-body&gt;
&lt;/ac:task&gt;
&lt;ac:task&gt;
&lt;ac:task-id&gt;8&lt;/ac:task-id&gt;
&lt;ac:task-status&gt;incomplete&lt;/ac:task-status&gt;
&lt;ac:task-body&gt;&lt;span&gt;&lt;ac:link&gt;&lt;ri:user ri:username="porter123" /&gt;&lt;/ac:link&gt; some task&lt;br /&gt;&lt;/span&gt;&lt;/ac:task-body&gt;
&lt;/ac:task&gt;
&lt;ac:task&gt;
&lt;ac:task-id&gt;9&lt;/ac:task-id&gt;
&lt;ac:task-status&gt;complete&lt;/ac:task-status&gt;
&lt;ac:task-body&gt;&lt;ac:link&gt;&lt;ri:user ri:username="admin" /&gt;&lt;/ac:link&gt; some task&lt;/ac:task-body&gt;
&lt;/ac:task&gt;
&lt;/ac:task-list&gt;

I'm not familiar with writing user macros, but I am assuming you should be able to reference or grep out the <ac:task-status>incomplete references and associate them with task-body username information to compile a list.

Maybe someone else can elaborate on how you can utilize this storage format data.

Hope this helps!

Hello Ryan,
thanks for your respond.
Your suggestion is exactly what i want to achieve with my macro. But i'm really struggling with the Confluence API. I can't find the propper methods to access / filter the storage format with a user macro.
Maybe someone else has done something similar with a macro and can give me some advice.

Regards,
Robin

Hello,
i want to give a short heads up for all the followers to this question.
I tried to generate the inline tasklist overview for one space via the user macros with no success.
The problem is that i can't reach the XHTML markup with those methods.
Thats why i started to develop a plugin with the sdk. I will post an update here as soon as i finish this plugin.

We need this feature to work propperly with the tasks in confluence. I still can't understand why this function wasn't implemented by atlassian in the first place.

Regards,
Robin

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

380 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you