Great Adventure’s Virtual Tour Server Management team wants to ensure that all issues created in the project have an assignee at the beginning of the week. To automate that process, you can create an escalation service that automatically adds an assignee when the week starts.
Click the Escalation Service built-in script.
Click Create Escalation Service>Escalation Service.
Enter the appropriate information in the fields:
Description is the name of the service. In our example, we use
VT Unassigned Triage.
JQL Query is the search string that produces the issues that need modification. This string should be tested in the issue navigator first, and then copied and pasted. For Great Adventure, they used
project=vt and assignee is empty.
As User is looking for which user will execute the service. Check to make sure that this user has the appropriate permissions. In this example, we’re using the local admin account.
Interval/Cron Expression defines how often and what days of the week the escalation service runs. In our example, we use
0 30 8 ? * Mon *which runs at 8:30am every Monday morning.
You can use sites like http://www.cronmaker.com/ to create a Cron expression for your Escalation Service, but be aware that Atlassian applications don’t use Cron in a standard manner. Review Atlassian’s Constructing Cron Expressions for a Filter Subscription page for some tips on writing Cron expressions for Jira.
Action allows you to choose from a wide range of pre-defined actions and workflow transitions that are present in your Jira instance.
Additional Issue Actions allows you to insert an in-line or script file into the service. In our example, we’ve changed the My Custom Field and cf value to Assignee and Project Lead respectively. Use Expand Examples to access some useful recipes.
Transition Options allows you to choose which transition operations you’d like to forego. In our example, we don’t select any of these options.
Click Run Now to execute the service right away. If you’d like to wait to run it until its set time, you can choose to Add Service. If you choose to Run Now, you’ll see results at the bottom of the screen
Once you Add Service, you’ll return to the Escalation Service page and see the service that you have created.
View Server Log Files
Great Adventure has security policies in place to ensure that their server maintenance and Jira front-end administration are done by different individuals. This policy means that when the Jira admin is trying to troubleshoot, they need to contact the server administrator and request the logs. This means that the logs may be unavailable when needed in the moment. With ScriptRunner, you can use the View Server Log Files built-in script to view a number of lines in the -Jira.log files.
Choose the View Server Log Files built-in script.
Set the Log File and Number of Lines fields as desired and click Run.
Once you run the built-in script, you can observe the logs.
Each built-in script runs the same way: click the name of the script, fill out the appropriate variables, and then click Run. Read the descriptions and then experiment with the various scripts, noting which ones you think would be most useful to you in your day to day tasks.