How do I populate a custom field with different default values upon create based on issue type


The background for my question is: I have created a new issue type called Feature Request. When a feature request gets approved, we are simply moving it to be an epic instead, in the same project.

I want to be able to find all epics who originated from feature requests. The WAS / WAS IN operators are not support for the issueType field so I am out of luck on that front.

I therefore was thinking about adding a custom field called "featureRequest" for all issue types and default it to "true" when a feature request is created and default it to "false" when any other issue type is created. Upon moving the feature request to a different issue type, that featureRequest field value would be moved and I can query any issue type based on featureRequest=true.

My question: Without using add-ons such as ScriptRunner, what options do I have to implement this defaulting behavior? 

I tried field schemes, field configuration schemes, etc - no luck.

Or is there even a different way of querying an issue based on what prior issueType it once was?

Any advice?

Thanks, Helge

2 answers

Hi Helge,

You can use ScriptRunner for JIRA Cloud and write a Post Function for the create transition that will set the value of a custom field to whatever you need it to be.

A starting point is this example which adds two custom field values together, but you can change it to just set a custom field based on the issue type:

Let me know if you need more help,


0 votes
Joe Pitt Community Champion Feb 24, 2017

I would think when you move the issue it would take along the value for the field and overwrite  the default. Have you tried that?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,799 views 11 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot