Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Make description field mandatory based on select list custom field

Ulrich Kone
Contributor
November 16, 2023

Hello

I'm trying to make the systeme field Description mandatory when a certain custom field get a specific value. If not the case then not

The custom field name is "A catégoriser"

Here is the script I did

 

import com.atlassian.jira.issue.fields.DescriptionSystemField
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript

//Apply Scriptrunner behaviour on select list field

def CustomField = getFieldById('customFieldId=11200') //select list field
def desc = getFieldByName('description') //multi-line text field

log.debug('customFieldId=11200' + CustomField.getValue())

if(CustomField.getValue() == "A catégoriser") {
   DescriptionSystemField.setRequired(true)
} else {
    DescriptionSystemField.setRequired(false)
}
But the script failed
Can somebody help me in that?
Best regards

2 answers

0 votes
Will McCall
Contributor
November 14, 2018

Meant to put this in reply but can't delete... 

0 votes
Andy Heinzer
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 Champions.
November 14, 2018

I would suggest creating a new kanban board to achieve this.  First, create a new JQL filter of just

order by rank asc

And save this filter.  Then, go to the Boards -> View all boards link.  From here create a new Kanban board and select the option to use an existing JQL filter.  Select the filter you just created.

This way you should see all the issues in your Jira instance in a single filter AND you will still have the ability to change the rank of these issues by dragging and dropping them on this board.  That specific syntax in the JQL filter is needed if you want to be able to change the rank of issues on a board.

Next, while viewing the board, go into the Board -> Configure button on that page.  In the Columns setting, I would recommend turning on the epics panel, aka the kanplan backlog.  This will help give you the sidebar navigation in the backlog to see the epics and which issues are in them and how many are complete.  

When you enable this feature, you then have to drag over all the statuses that you want to appear in the backlog.  In my case, I selected all the statuses in the To Do category (blue).   You could add more than just these if you want to see the in progress and done issue as well here.

 

This view though does not show the due date of the epic itself. However if you have due dates set on each issue in Jira, you could then also configure the board and go to the Card layout setting.  Here you can add fields to the cards/issues that appear on the board/backlog and include the due date field here.  That would at least give you the due dates as they are set for individual issues.

 

kanplan1.png

Will McCall
Contributor
November 14, 2018

Thanks for your detailed response. It accomplishes some of what i'm trying to do but not as an all in one solution i'm looking for.

I'm trying to rank the epics on the board, not the stories. My board filter includes "issuetype = Epic". One issue I'm having is the rank order in the backlog doesn't match the order in the issues view if I add rank as a column and sort ascending. Any advice here?

The epics panel does give me the # of issues vs # of issues completed I'm trying to see however, since my filter is only pulling in epics it shows 0 for everything. Also, once the epics panel is toggled on epics don't show on the board.

I have the view 90% of the way complete. If only I could add a field to the epic cards that showed how many issues in the epic were complete. I also wish the added fields had the option of being laid out horizontally instead of vertically in the backlog. It makes the cards too tall.

Another potential solution would be the ability to drag and drop to change rank on the all issues view.

Main outstanding concern is the rank mismatch between the two views...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events