Using Multi Checkboxes, how to: force all items to be set, view as a list?

Juha Kuusama July 26, 2011

In a workflow, we need a checklist of items. That works fine, mostly, except:

1) The list shows nicely in the edit screen. How can I get the same view in the issue view? It would be nice to see the list as completed/not completed view, without needing to go to the edit screen.

2) How can I force all (or given) items to be set before it is possible to move on? Currently we have a "None" field as a crude solution to the first item. If the first item can be solved, we really want all items to be checked; if not, then all but the "None".

Thank you for your ideas!

3 answers

1 accepted

1 vote
Answer accepted
J Thomas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2011

1) Yes, I've wanted this too - it's more important to see what's not selected in terms of progress. You could flip your list around and make it a list of items still to do, then default everything to checked. As items are completed they are no longer 'to do' and the checkbox can be unchecked. If you wanted to keep not ticked = not done you could either edit the view template for that field or create a new custom field plugin which uses the multiselect field but write your own velocity template to view the unselected items.

2) The Script Runner plugin can help you here. To validate an item is checked the syntax is:

cfValues['My Field Name'].contains('Option Text')

so you can just 'and' these together to test for multiple options (I believe the field contains a comma-separated list of the selected items which is surrounded by square brackets so eg if only one option was selected it would be '[Option Text]').

J Thomas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2011

I really should check for new answers before committing my two cents but at least great minds think alike...

Juha Kuusama July 26, 2011

Having a "not yet done" list is a good idea, thank you! Certainly good enough not to spend our resources to make it look nice but without really achieving anything.

I'll start learning about the Script Runner; your syntax is of great help. Thanks for that, too.

J Thomas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2011

Script Runner is great if you can master the basic syntax! If you want to check an item isn't selected you can negate the code snippet with ! at the beginning or == false at the end (ie Option Text isn't selected).

0 votes
Yves Riel [Okapya]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 4, 2013

I know it is an old post but for future reference, the Checklist add-on does exactly this:

  • Display the checkboxes in both Edit and View modes
  • Can prevent a workflow transition based on what selected
Ruth February 13, 2014

I don't understand why I have to install and pay for a plugin in order to have the checkbox displayed with it's current selection - it doesn't make sense to have to go into edit mode to view the checkboxes. The plugin has it right - but why isn't this an included feature of the checkbox custom field?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2011

I don't quite understand the first question, sorry. I think you're asking for a full list of all the options to be displayed, not just the selected ones? If that's the case, then you need to think about how you tell the users which ones are selected and which are not, and then it's a bit of a rewrite of the "view-multiselect.vm" file in the core of Jira (I think that's in WEB-INF/classes/templates/plugins/fields/view, but I'm not sure as I don't have a Jira to hand at present, and I'm mostly working on 4.0 at the moment and it may have moved)

Second one needs a bit of code, although you could probably find a plugin prewritten (or definitely just install the script runner plugin and do it in groovy). You either need a "validator" to check the users have entered it all correctly, or, you could use a post-function to set all items as selected if the user happens to choose "none"

Juha Kuusama July 26, 2011

Yes, I'd like to show the full list and indicate what is done, what is not. If the cabability is not built in, I'll pass: programming Jira is beyond my abilities and not worth the effort.

Suggest an answer

Log in or Sign up to answer