Forums

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

How can you programmatically (scriptrunner-groovy) assign a validation script to a workflow.

Tim Thompson May 25, 2022

I have a standard validator (one scriptrunner script) that I want to apply to multiple workflow transitions across 100s of projects. Too many to do manually and I cannot share the workflow as one issuetype the project admins may modify for their project (other controls built to manage that). 

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.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events