Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

PIR - Automation

Rus Yates-Aylott January 12, 2024

Hi.


We would like to be able to automate the creation of a PIR when an action is taken on an incident.

For example: An incident is marked as a Major Incident. Several actions are taken including the creation of the PIR case.

We have successfully created a case with the system-level Post-Incident review type. However, this does not appear in the PIR folder/filter view and does not carry the Request Type of 'Create a post-incident review'.


Is this possible?

1 answer

1 accepted

0 votes
Answer accepted
Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2024

Hi @Rus Yates-Aylott

Sure! You can create an automation that will have the trigger of "field value changed" and select the MAJOR INCIDENT field. Then, a condition to validate if this field is set and, lastly, the action to create a new issue based on your PIR issue type.

Please remember to accept this answer in case it helps you resolve your question as it may also help other community members in the future.

Regards,
Eugenio

Rus Yates-Aylott January 12, 2024

I CAN create a PIR (Issue Type) but cannot set the Request type to 'Create a post-incident review'

Rus Yates-Aylott January 12, 2024

Here's the flow that creates the PIR:

Screenshot 2024-01-12 160043.png
It creates the PIR case based on the Issue type 'Post-incident review':
Screenshot 2024-01-12 161457.png

In the branch, we are trying to set the Request type:Screenshot 2024-01-12 161528.png
This produces the following error:
Screenshot 2024-01-12 161612.png

Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2024

You can! The request type is a custom field, so you can set it using the smart values. Something linke "customfield_XXXX.name": "value" in JSON.

Rus Yates-Aylott January 15, 2024

I am still having an issue.

When I first used the action to update the Request Type, I received the error shown above. This gave me the name of the custom field.

So now I tried your suggestion of amending the custom field using json.

Here is my code:
Screenshot 2024-01-15 084628.png

This now produces a different error:
Screenshot 2024-01-15 084751.png
I cannot believe there is no way to update this field. Maybe I have something wrong?

Rus Yates-Aylott January 15, 2024

I have read this article and have tried amending the Actor from Automation to myself. This made no difference:https://confluence.atlassian.com/automationkb/automation-for-jira-reporting-unknown-fields-set-during-edit-they-may-be-unavailable-for-the-project-type-1130727699.html

Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2024

@Rus Yates-Aylott

You are not using the appropriate structure of the Request Type field!
The JSON for the Request Type field is not correct.

Best approach would be to set this field manually in a single ticket, do a GET request for this specific field, so you can check the correct JSON structure for the Request Type field.

Rus Yates-Aylott January 16, 2024

Thanks. We finally discovered the issue was that, when attempting to use the 'Edit the Request type' action, it was reporting an issue against an incorrect customfield name. 
When we went in to look at Request Types linked to Issue Types (Atlassian admin level) we discovered the correct customfield name and used that in the json to amend the field. We also had to you the code that represented the value rather than a string of text.

All rather convoluted, but that's jira I guess.

Still. Thanks for your assistance & support. Much appreciated.

Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2024

@Rus Yates-Aylott great to hear. Please remember to accept this answer so it can be seen by other community members and help them out with the finds we had on this thread!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events