Hi guys,
So I:
Just trying to do something I thought would be simple. I must be missing something. Can anyone help me with an example rule please?
Hi guys, the documentation suggests the following but is not clear. You cannot use properties such as sum and max with custom fields in a Jira Automation rule (Jira Data Center platform). There is a ticket open with Atlassian that relates to this issue but even that is not clear on which properties are not supported.
I found another article that identified a possible workaround is to use the ACTION "send web request". This is where (in my use case) I use the search method (API) and JQL to query Jira via the API. I have now got this working and I am now able to sum up a field (value) for a number of issues successfully.
FYI
1. Action : Send web request
2. "Send web request" configuration:
Webhook URL : https://<your domain>/rest/api/2/search/
Headers: Authorization Bearer <PAT id you have created in Jira>
Accept application/json
HTTP Method: Post
Webhook Body (custom data):
{
"fields": [
"summary",
"status",
"customfield_11139"
],
"jql": "project=NPR and issuetype=risk"
}
NOTE: You can use any API call GET or POST. The above returns all issues of type risk
for a specific project
3. Now sum up the custom field "Score Risk" which is field customfield_11139. There are
multiple actions where you can do this. I am showing example using "Send email"
Content:
Total Risk Score = {{webhookResponse.body.issues.fields.customfield_11139.sum}}
Complete Payload Response =
{{webhookResponses}}
Hope this helps someone in the future.
Regards.
Stuart.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.