Automatically add incident reporters to problem tickets

Use case

In our Jira Service Management project, we want to automatically add the incident's reporter as a Request Participant on the related problem ticket once the incident is marked as "Done."

Prerequisite

To enable this functionality in Jira Service Management, a dedicated project must be created specifically for recording incidents and tracking related problems. Each incident ticket should then be linked to its corresponding problem ticket using the "is caused by" relationship. This link ensures that incidents are directly associated with their underlying problem. In addition, the custom Request Participant field must be available on the Incident and Problem ticket edit screens. This field allows participants to be added to receive updates on the ticket. The custom field code for Request participants is 10040 and will be used later.

🛠️ Configuration

Get started and set the issue to be updated

Add the post function Update fields to the transition of the Done transition of the incident workflow. As we would like to update the Request Participants of the problem ticket, we need to identify the issue to be updated. To to this, we choose as the target issue a parser expression. Here we use the linkedIssues() function to follow the link torwards the problem ticket, that was already set previously.

Target issue --> Parser expression
%{linkedIssues("is caused by")}

Use the Fields required or changed validator to ensure that the required field is set.

Add the request participents to the problem ticket

To add the request participents click on Add field and choose Request participants.

Value → Set field value manually (parser expression).

To add the request participant to the problem ticket you must use the append() function to ensure that you do not overwrite the existing request participants. First, use the fieldValue (%{issue.cf10040},linkedIssues("is caused by")) function. Here, fieldValue() accesses the custom field for request participants, and in the second step, the linkedIssues("is caused by") function references the linked problem ticket. In addition, the toStringList(%{issue.reporter}) function retrieves the request participants from the incident ticket and returns the reporter's account id. 

Add field → Request participants --> Value
%{append(fieldValue(%{issue.cf10040}, linkedIssues("is caused by")),toStringList(%{issue.reporter}))}
How to get a custom field code

Simply click Add field and search for Request participants within the expression parser to find the correct custom field.

Expression Parser Add field.png
Use case Workflow function Parser functions
Set the due date based on the priority

Update fields

getMatchingValue()

Obtain the difference between two dates

Update fields


Assign an issue to the user who last commented on it

Update fields


Add three days skipping weekends automatically to a Date Picker

Update fields


Keep parent's priority in sync

Update fields


Set the assignee based on the issue type

Update fields

getMatchingValue()

Set the fix version to affects version when resolving an issue

Update fields


Use the app user to update non-editable fields

Update fields


Automatically add incident reporters to problem tickets

Update fields

append()

fieldValue()

linkedIssues()

toStringList()

Copy labels of a sub-task to the parent issue upon closing

Update fields


Assign an issue to the project lead, if the issue is unassigned on creation

Update fields


Add watchers from another field

Update fields

Transition issue

union()

toStringList()

Add a sub-task's summary and key to the description of its parent

Update fields


Set a date field to a future date

Update fields

dateTimeToString()

Record an auditable timestamp of a Compliance Approval

Update fields

dateTimeToString()

Copy field values from epic to issues under it after creation

Update fields Transition issue

epic()

issuesUnderEpic()

filterByStatus()

Set a date field to the current date

Update fields

dateTimeToString()

Assign important issues to the project lead

Update fields


Set the priority to Highest if the 'Infrastructure' component is selected

Update fields


Background priority calculation

Update fields

avg()