Behaviour on Issue Type working on issue Create screen but not on issue Edit screen

I have a project "IT Checklist" with issue types as Daily Checklist, Weekly Checklist.....Yearly Checklist.

I have a behaviour which sets the summary based on the issue type selected and the date selected.

The behaviour is working fine on Create issue screen but is not working on Edit issue screen.

This behaviour is set of Issue Type field and has a mapping for each of the issue types of this project.

IT Checklist (Daily Checklist)

IT Checklist (Weekly Checklist)


The script is as below:

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.*

String selectedIssueType = getIssueContext().getIssueTypeObject().getName();

FormField checklistDateField = getFieldById("customfield_16706")
def checklistDate = checklistDateField.getValue();

def summaryToSet = selectedIssueType + " - " + checklistDate;

FormField Summary = getFieldById("summary");


As you can see, I am using getIssueContext().getIssueTypeObject(), which according to the few previous answers I went through should be available on both Create and Edit screens. However, it doesn't seem to work.

Will appreciate help.

1 answer

An update.

Just discovered that the script is not even working on Create screen. I just realised that I was getting desired summary not because I changed issue type, but because it loads full form and I have similar script on another field (Date).

I essence, above script is not working either on Create or Edit.

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
Fadoua M. Boualem
Published yesterday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

377 views 5 5
Read article

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