Hi all,
I would like to do a specific check for existing linked issues and only allow the transition if the linked issue of a specific type is existing.
I know, how I can do it for one workflow step and the code is already working. I am doing this with ScriptRunner validator and could share the code if needed.
Unfortunately, this check would have to be applied to every workflow step and would have therefore need to be copied again and again. The workflow consists of more than 20 steps and even more transitions.
Is there a way to re-use such a validator or configure a validator to be used in a specific set of transitions? Or is there a way to use the behaviors of ScriptRunner in order to make the linked issues required (but only for a given issue type)
Thanks!
Hi Stefan - Welcome to the Atlassian Community!
I don't use ScriptRunner so not sure if that is able to be copied or not. But have you thought about sharing the workflow across projects? How different are the workflows being used? Maybe even copy the updated workflow with the code in it and modify it to return the other functionality of the other workflows.
In Scriptrunner, most scripts can be saved to the file system and called from there, as well as the standard "inline" option.
If you have a validator script you want to reuse, you can save it once, and then tell all the transitions to read that script instead of having to copy and paste it every time.
But you still need to add that validator to each transition separately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same challenge - I want to apply the same validator script across multiple workflows and projects. Too many to do manually and I don't want to share as in one case the project admins can modify one issue type workflow for a project.
I have build a script that given a project it
1. loops issue types (IssueTypeSchemeManager.getIssueTypesForProject)
2. retrieves the workflows (WorkflowManager.getWorkflow(thisPROJECT.id, it.id) and
3. loops actions, validators and args
theWORKFLOW.getAllActions().each { it.getValidators().each { it.getArgs().each { it.getKey()
My hunch is the name of the script is buried somewhere in args key FIELD_FUNCTION_ID or FIELD_CONDITION value using the hashCode but since Jira uses com.opensymphony.workflow I'm stuck there.
I am hoping once I can find one that has been manually set, I can decrypt and then re-encrypt and assign to other workflows.
Any suggestions? Not finding much out there about com.opensymphony.workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Tim Thompson - You should always create a new question so more people will see it. Posted here is only seen by 3 people.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.