In the inbuilt post function {Clones an issue and links} in groovy how to use a custom field of type radio Button can be used in condition

I want to create issues on the basis of customfield value of a field type Radio Button.

Also, Additional issue actions gives error in the log saying that issueInputParameters is not defined in groovy.

Please help, Thanks in advance.

Regards,
Sumit

1 answer

1 accepted

2 votes
Henning Tietgens Community Champion Jan 02, 2014

You can access the radio button value like this cfValues['radio button field name'].value. For the additional issue actions please share your code, so that we are able to help you.

Hi Henning,

cfValues['radio button field name'].value is working.

Below are the steps to replicate the 2nd issues :

If you add scripted post function Clones an issue and links there is a option of setting issue input parameter like Set a issue summary, Set Custom field etc

When I am clicking on the existing option of set issue summary a code get populated with following code : :

issueInputParameters.setSummary('new summary')

issueInputParameters.setSkipScreenCheck(true)

When I am executing the transition I am getting the following error in the log :

2014-01-03 11:16:21,768 http-bio-8080-exec-10 ERROR sumit 676x2094x1 1pepujq 127.0.0.1 /secure/WorkflowUIDispatcher.jspa [onresolve.jira.groovy.GroovyFunctionPlugin] Error executing post-function

javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: issueInputParameters for class: Script5

at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:117)

Jira Version 5.2.10 & Script Runner 2.1.15

Please let me know if anything else is required.

Thanks,
Sumit

Henning Tietgens Community Champion Jan 02, 2014

I took a look at the source, it seems the issueInputParameters doesn't exists for this built-in postfunction. You can use issue to access the new issue.

thanks , it worked using issue

Hi Hennings,

Is there a way to access the parent issues values as well ?

Thanks,

Sumit

Henning Tietgens Community Champion Jan 05, 2014

I don't think so, not within the additional script. In the condition, you can access it via "issue".

Thanks a lot .. :) it helped .!!

Regards,

Sumit

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
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

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