You can now vote for scripts to help people know if they're useful or not. Login or create an account to vote!

1

Number of Linked Alerts - ITSM

Overview

Count and display (using a Custom Script Field with a Number Field template) the number of issues with an Alert issue type that are linked with a Problem/Incident to another issue.

  • Navigate to Add-ons > Script Fields using the Administration Cog in the top right corner.
  • Click Add New Item and choose Custom Script Field.
  • Configure the screen and add the code.
  • Click Add.

Example

Detailed use case example: Adding Scripted Fields to Count Alerts

Requirements

  • Jira Jira (8.0 - 8.14)
  • ScriptRunner for Jira ScriptRunner for Jira (6.18.0)
    
import com.atlassian.jira.component.ComponentAccessor final alertIssueType = 'Alert' final linkNamesForIncident = ['Problem/Incident'] ComponentAccessor.issueLinkManager .getOutwardLinks(issue.id) .findAll { it.issueLinkType.name in linkNamesForIncident && it.destinationObject.issueType.name == alertIssueType } .size()
Discovered an issue? Report it here

Suggested for you

Appears in these Collections