how to auto create issue & follow-up id in jira based on customs field option and issue move to one tranistion to another tranisiton.

2 answers

1 vote

I'm confused by some of the question, and would like some explanation on other bits:

>auto create issue

Lots of ways, but the question here is when?  When do you want to automatically create an issue - what is the trigger?

>follow up ID

I don't know what you want from "and follow up id"

>based on custom field options

What do you want to do with the options in a custom field?

>issue move to one transition to another transition

I'm afraid that is nonsense.  Issues move from one status to another through transitions.  Talking about transitions in that way simply doesn't make sense and I can't guess at any meaning.

Sorry that's a bit of a brain dump, but I'm really struggling to understand the question.


really we need to auto create issue in JIRA based on the custom field values.

we have one custom field called as "Manual Hotfix required?" if values is yes means create one issue in another project. if it is no means no action required.

how we can do this?.

if this action was happen in workflow transition.

For example : issue status changed to pending to fix reviewed. At this time we need to check that custom field values (Manual Hotfix required?='Yes' ) is trun means auto create one issue in another project. 



Ok, that's explained it all.

You'll need to write a little bit of code to do this - you need a post-function that can read the current value and construct a new issue in the other project.

I'd use the script-runner add-on as usual.

Hi ,

we have downloaded some add ons and tried to create a issue while changing the transition from one to other and also check the custom field value . it results some error.




i am using the post functions and add ons as below :


workflow enhancer fore JIRA 






How did you install the add-on?  Via the UPM (Admin -> Add-ons -> Find new add-ons) or manually via "uppload add-on"?

Hi Nic,

We've installed the add on by using -> find new add on's

and installed it on usual basis. We didn't upload the add on.

Ok, that's good, because it means you have installed a valid version of the add-on (There's been a trend recently here on Answers for reports of add-ons not working, which, when investigated, it's because some idiot has installed a version that's invalid)

On the down-side, that actually suggests that there's either a bug in the add-on, or an oversight in the code that lets you do some bad configuration and the add-on doesn't handle it well.

The question now is what exactly have you configured there?

HI Nic,

we have tried to create a new issue using the post function when a custom field value satisfies the condition then issue will be create or else no need to create.


this is the post function screen .

first we are checking the field with boolean function and the using issue clone post function .u can see that in the image .


we have tried with the different type of conditions to evaluate. but it results with error or else issue not creating.



conditions used :

{Manual HotFix required?} == "Yes"

{Manual HotFix required?} == "[Yes]"

{Manual HotFix required?} == ["Yes"]

{12060} == "Yes"

{12060} == "[Yes]"

{12060} == ["Yes"]



please provide any suggestion for the sample condition .



Ok, got it - you're using a boolean field and a string as the input.  Boolean fields can only have three values null/empty, true and false.  Comparing them to strings like "yes" won't work.

we have checked with true and false value also .but no luck on this .

can you pls suggest or provide any sample format for the condition .

What, exactly is the field you're checking?  The type and values you're looking for?

Manual hot fix required is the combo field .it have two values yes or no .but after ur suggestion we have changed as true and false.


if the manual hot fix required combo is selected with the value true  during the transition then need to clone the issue through the post function and changing the status as per the transitions .this is wat we are exactly looking .

It seems that you need some more hardcode-solution. U would recommend you to create a you on script function. 

At first see this ( for fast develop of postfunction. I ussually use same scripted field to test my postfunction. 

Let start with first part - how to evaluate is it reqared to create an issue. I assume that you use a radio button custom field. Here is code example which returns true when hotfix requred, and false when not requared or fild is empty:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField

CustomField radioButton = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Manual HotFix required?");

if(radioButton == null)
    return "no such field"

if(radioButton.getValue(issue) == null)
    return "false"

    return  "true"
    return "false"

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

385 views 6 0
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