How do I allow a customfield of type checkboxes to show the unchecked boxes in an issue ?

emilieL29 April 25, 2019

Hi everyone!

I'm currently working on a feature that require the creation of a new customfield of type checklist for a Jira Software plugin. 

The idea is to programmatically create a customfield of type multiselect that propose a list of checkboxes to check. I'm having trouble to find the right methods to do so.

Is any of you already did something like that ? Or have any advice ?

UPDATE :

I managed to create the customfield I needed but if the checkboxes are not checked, the options doesn't appears in the issue (view.vm).

I'm currently searching in target/jira/webapp/secure/admin.views/customfields if I can change the code that hide the options if not checked.

Is someone did it already ? Any advice on how to change that so I can see my unchecked boxes ?

Thanks :-) 

3 answers

0 votes
emilieL29 April 25, 2019

@Tomas Gustavsson and @[deleted] first of all thank you for your reply.

What we want to do is create a new custom field of type Check list to show the Definition of done criteria. 

The trouble with the native custom field of type checkbox is that you can't see the options that are not checked, and if so, you see them in a row, on one single line. So we had to develop our own custom field.

Here is an example of what we want to achieve :

dod.PNG

For now I looked in the Atlassian API documentation and find the MultiSelectCFType class but I'm not sure how to use it to do what I want.

 

I hope it'll help for your advice.

Thanks

 

 

Tomas Gustavsson
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.
April 25, 2019

If you use the example above you will get exactly what you are asking for. 

this is what it looks like in Jira 
image.png

But you need to have  JSU - Suite Utilities for Jira, to be able to use this.

Create a field as below, and leave it empty.

image.png
Then add the field in a post function like below

Update Any Issue Field (JSU)

  • Issue Field:  Decomission checklist
  • Field Value: [{"id":"Check ","type":"todo"}, {"id":"Remove","type":"todo"}, {"id":"Set ","type":"todo"}, {"id":"Update ","type":"todo"}, {"id":"Remove from ","type":"todo"}, {"id":"Power off","type":"todo"}]
emilieL29 April 26, 2019

Indeed it's a really good solution, but unfortunately we can't use any add-ons.

0 votes
Tomas Gustavsson
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.
April 25, 2019

I'm not sure what you are looking for, but i have this idea, may be it helps.

i'm using Jira suite util, in a post function i have following

 
Update Any Issue Field (JSU)

  • Issue Field:  checklist
  • Field Value: [{"id":"Check ","type":"todo"}, {"id":"Remove","type":"todo"}, {"id":"Set ","type":"todo"}, {"id":"Update ","type":"todo"}, {"id":"Remove from ","type":"todo"}, {"id":"Power off","type":"todo"}]

this field value, can be changed for each transition and i think that is maybe what you are after.

0 votes
Deleted user April 25, 2019

Hi @emilieL29   I'm trying to understand your requirement 

---> Depends upon the Value selected in Checklist Field you need to Show/Hide the another custom field is that correct ? 

 

Thanks,

Phani

Suggest an answer

Log in or Sign up to answer