Hello community,
I connected a Jira project to Status Page to trigger incidents automatically in StatusPage when a major incident is declared.
In jira, I have a transition screen with a checkbox field to indicate the impacted services ex: Data Warehouse, Security, Logistics When a jira incident is declared as major, an automation is triggered to create an incident via an API call in StatusPage.
I've created components in statusPage based on impacted services corresponding to the values in jira's impacted services field.
The automatic creation of the StatusPage incident by API works very well, for the moment I hard-code StatusPage components ID in the body of creation incident API call.
The next step is to be able to condition the list of StatusPage components according to the values ticked in the Jira ticket... And I don't know how to do that.
How to indicate the value of the jira field to select the StatusPage component IDs.
Examples: If I select checkbox values Security and Logistics in the checkbox, I want a Automation to select only the 2 statuspage compoents IDs.
If I select only DataWarehouse in the checkbox, Automation will use the Datawarehouse ID component.
So my question is how to condition smartvalues to get statuspage component ID related to values selected in the checkbox in order to send incidents with corresponding impacted components ?
I hope explanation of my qestion is clear ^^
Thank you!
Cedric
Hi @Bill Sheboy
Finally if find the solution with a loop to get all value selected by user then changes by statuspage component ids here my example:
1. I create a variable "componentids" to get values from selected list with this rules
{{#issue.customfield_10123}}
{{#if(equals(value, "value1"))}}"componentid1"{{/}}
{{#if(equals(value, "value2"))}}"componentid2"{{/}}
{{#if(equals(value, "value3"))}}"componentid3"{{/}}
{{#if(equals(value, "value4"))}}"componentid4"{{/}}
{{^last}}, {{/}}
{{/issue.customfield_10672}}
If user select value1 + value 2 the result is "componentid1","componentid2"
2. I send a webrequest api to status page to create a incident and select good components impacted by incident.
Thanks for the information, @Cedric Devaux
Just to confirm, did this solve the question you originally asked?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
If you are calling the REST API endpoint and want to translate the values from a Jira multiple-select option field to your request component ID values, I suspect you would use list iteration to build the JSON message, perhaps with conditional logic to translate the values to the IDs
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.