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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,334
Community Members
 
Community Events
176
Community Groups

Search through ScriptRunner scripts?

Is there a way to search through all ScriptRunner scripts to see if they contain a string value?

 

I've noticed that a previous developer hard-coded field values in some scripts. I need a way to ensure I do not break legacy code if I change the values of a Select List (single choice), for example.

 

 

2 answers

1 accepted

0 votes
Answer accepted

I logged a ticket with Adaptavist, see response below:

https://productsupport.adaptavist.com/servicedesk/customer/portal/23/SRJCLSUP-4896

Hi @Jacques B ,

can you report here the response because I haven't permission to view this request?

Thank you

Hi @Andrea Pannitti , below is the response from Adaptavist Support.

 

Than you for creating a support ticket with our team,

Unfortunately on ScriptRunner for Jira Cloud there is no straight forward way to achieve this, as we do not currently provide a report to generate a list of all these scripts and configurations in one central place as we do in the Server version with the Script Registry built-in script that it provides.

This means that the only way to get this information is to manually review your instance in order to check every location where you can configure the features provided by ScriptRunner.

Listed below is every location that you will need to check in order to be able to document all of these scripts. Please note for point 6 we have created a new Workflows page and on this, you will be able to click the ... icon next to each item and then edit it from this page in order to view the script inline which will save you some time as you won't need to need manually load and navigate through each workflow.

Steps to find out where ScriptRunner for Jira Cloud Scripts and Configuration is used:

  1. Script Listeners: - I can confirm that you will be able to see all Script Listener Scripts which have been configured in the cloud instance by navigating to the URL of <JiraBaseURL>/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/script-events-admin?s=com.onresolve.jira.groovy.groovyrunner__script-events-admin and this page will show any scripts that you have configured so that you can document these for your new developer.
  2. Script Fragments: I can confirm that you will be able to see all Script Fragment Scripts which have been configured in the cloud instance by navigating to the URL of <JiraBaseURL>/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/script-fragments?s=com.onresolve.jira.groovy.groovyrunner__script-fragments and this page will show any scripts that you have configured so that you can document these for your new developer.
  3. Scheduled Jobs: I can confirm that you will be able to see all Scheduled Jobs Scripts which have been configured in the cloud instance by navigating to the URL of <JiraBaseURL>/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/scheduled-jobs?s=com.onresolve.jira.groovy.groovyrunner__scheduled-jobs and this page will show any scripts that you have configured so that you can document these for your new developer.
  4. Escalation Services: I can confirm that you will be able to see all Escalation Services Scripts which have been configured in the cloud instance by navigating to the URL of <JiraBaseURL>plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/escalation-service?s=com.onresolve.jira.groovy.groovyrunner__escalation-service and this page will show any scripts that you have configured so that you can document these for your new developer.
  5. Enhanced Search Queries: I can confirm that we do not provide a way to see all enhanced search queries that have been created in one place which means that you will need to ask users to tell you any queries that they have created
  6. Workflow Post Functions, Conditions and Validator: I can confirm that you will be able to see all the Workflow Post Functions, Conditions and Validator which have been configured in the cloud instance by navigating to the URL of <JiraBaseURL>plugins/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/workflows?s=com.onresolve.jira.groovy.groovyrunner__workflows*and this page will show any scripts that you have configured so that you can document these for your new developer.

We have a public-facing feature request to create a report to show where all scripts are used inside of our backlog here and I would ask you to vote on this request if you believe that is useful to your company. 

Hi @Jacques B ,

you could call this rest in POST:

/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.ScriptRegistry

and then search your string in the json response.

Or, alternatively, look directly into the ScriptRunner Registry. You can found it in ScriptRunner Settings clicking on 3 dots.

Hi @Andrea Pannitti 

Thanks for the response.

I tried the request with Soap UI, but get a 404. Is there something obvious I'm doing wrong?

2022-07-14 08_03_35-SoapUI 5.7.0.png

Hi @Jacques B,

sorry, only now I noticed you're on cloud and my solution is for server or data center.

Like Jacques B likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events