Hi,
I've created a built-in listener "Fast-track transition an issue" with scriptrunner plugin from Adaptavist
The event is fired properly, the transition is executed and some post-functions are also executed.
One of this post function is to update a custom field (a select-list one).
I've copied the "Set select list custom field" snippet" which is :
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObjectByName("Some Select List") // name of CF
def optionsManager = ComponentAccessor.getOptionsManager()
def fieldConfig = customField.getRelevantConfig(issue)
def option = optionsManager.getOptions(fieldConfig).find { it.value == "Yes" } // value of option
issueInputParameters.addCustomFieldValue(customField.id, option.optionId as String)
issueInputParameters.setSkipScreenCheck(true)
The code analysis sets a warning on the customFieldManager definition, saying "Variable "customFieldManager" masks a binding variable. Please choose a different name for variable: "customFieldManager" @ line 8, column 5.
I've several listeners configured the same way (but with different custom fields...all select-list). Some works, some don't...
I'm new with scriptrunner so I may have missed something...but I would exect built-in snippets to work from scratch....
If someone from Adaptavist could help, this would be great !
I don't think there is any web-fragment location that you can bind a web panel to in a dialog.
I think the best hack I can think of to add a webpanel-like element on a screen dialog would be to use behaviour and use setHelpText() on the last field in the screen and put your html in the helptext. You would have to override the style to not have the red-color.
There may be limitations as to what html can be inserted there.
Hi Peter ,
I have another requirement where , I need to create a shortcut link to "Create Sub-Task" feature in Jira and insert the link in one of the transition screens.
Any idea if this can be achieved in Jira or through any third party add ons.
Thanks,
Ajinkya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like my earlier response, you can only do that with behaviour.
Behavior setHelpText and setDescription support full html, so you can post a link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.