Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

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
AUG Leaders

Atlassian Community Events