This use case combines a JQL Search Extensions keyword with Power Script’s SIL Manager and Scheduler to create a scheduled task (escalation service) that finds issues linked to high-priority ones and updates the priority to match.
Scenario | Your team doesn’t know the priority of an issue dependency has increased, therefore they don’t prioritize the linked issue causing misalignment across the projects and delays. Solution: Build an escalation service that updates the priority of a ticket whenever a linked issue has a High priority. |
JSE keyword | linkedIssuePriority
|
Power Scripts features | SIL Manager and Scheduler |
Method | In Jira, go to Settings > Apps. In the Apps sidebar menu, under POWER SCRIPTS, select SIL Manager. On the SIL Manager page, select File > New file to create a new file. Add the following script to the file, and replace MyProject with your project details.
string [] issues = selectIssues("project = MyProject AND linkedIssuePriority = 'High' AND priority != 'High' AND statusCategory != Done");
for(string issueKey in issues) {
%issueKey%.priority = "High";
}
Enter a name for the file, then click the Save icon in the top menu to save the file. Select Power Apps Config in the left sidebar. The Power Apps Config menu displays. Select Advanced > Scheduler to display the Scheduled Jobs page. Click Schedule job. The Schedule new job window displays. Select Interval for the Job type. Alternatively, use a CRON expression to define the interval. Set the interval when the script should run, for example,1h. Select the Edit icon in the Script field. Select the saved file from the list and click Select.
In the Schedule new job window, select the Run as user.
Click Save. Your saved scheduled job displays in the list of scheduled jobs. You can later edit or delete the job as required.
Now, every 60 minutes, this script will run and update the priority of any issues that match the JQL query used in the script.
|