Forums

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

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

Sumit Kumar
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 Leaders.
January 2, 2014

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
Answer accepted
Henning Tietgens
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 Leaders.
January 2, 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.

Sumit Kumar
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 Leaders.
January 2, 2014

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
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 Leaders.
January 2, 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.

Sumit Kumar
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 Leaders.
January 2, 2014

thanks , it worked using issue

Sumit Kumar
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 Leaders.
January 5, 2014

Hi Hennings,

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

Thanks,

Sumit

Henning Tietgens
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 Leaders.
January 5, 2014

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

Sumit Kumar
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 Leaders.
January 5, 2014

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

Regards,

Sumit

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events