Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×Hello together,
I have tried many otpions with JIRA automation to solve my requirement but without success...
My goal is to set up one/many JIRA automation that sums the values from three custom fields (Effort CON, Effort DEV, Effort INT) of User Stories and updates this sum in the "Sum Effort CON", "Sum Effort DEV" & "Sum Effort INT" field on the associated Epic.
For Example:
Story 1:
Effort INT = 1
Effort DEV = 10
Effort CON = 1
Story 2:
Effort INT = 1
Effort DEV = 1
Effort CON = 1
Parent Epic:
Effort INT = 2
Effort DEV = 11
Effort CON = 2
Hope you can help me.
Thanks in advance!
Regards,
Joscha
Hi @joscha_reinhard -- Welcome to the Atlassian Community!
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...
At this time, the Lookup Issues action for Jira Data Center automation does not support custom fields: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
For your scenario to update the parent issue with those fields, a workaround is to use the Send Web Request action to call the REST API for issue search with JQL, and then use the web response to sum the fields.
Please see this earlier post where I describe the approach in more detail: https://community.atlassian.com/t5/Jira-questions/Re-How-to-sum-story-custom-filed-values-to-an-epic/qaq-p/2787339/comment-id/1043853#M1043853
Kind regards,
Bill
Hi @Bill Sheboy
I have tried your way mentioned in your post (I am new on JIRA Automation).
Attached my complete automation.
I hope you can assist..
Trigger:
If Clause: Story
Send Request:
Compare:
Edit:
Customfield ID:
Here the Audit Log after changung the field Value of field "Effort CON"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your Send Web Request action appears to be calling the wrong endpoint. Instead use the issue search, passing the JQL as a parameter:
https://docs.atlassian.com/software/jira/docs/api/REST/9.13.0/#api/2/search-search
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for asking again, but how exactly should I implement this?
Issue search is known to me via the lookup function.
But here I mean knowing that it doesn't work for custom fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I made a change at the URL "*/rest/api/2/search?jql=cf[10108]={{issue.key}}"
I still get the error: "NO ACTIONS PERFORMED"
cf[10108] = Epic Link
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please show an image of the audit log details for the rule execution, obscuring your site URL. That may provide context for what you are observing. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, thanks for your time & help
Here are two screenshots:
First: Branch for "Epic (Parent) + logFIle
Second: Brachn for Parent + logFile
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you use that REST API URL with an example Epic key in a browser tab, does it work as you expect?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes I think that worked as a expact.
Here the a whole epic:
Here the search for the specific custom field:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The second image is showing no issues found. If you run that JQL standalone outside of the rule, what do you see?
cf[10108]=ISE-10
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
in this case that was my fault.
My custom field ID is cf[10200].
With the correct string the API call works.
Searching in the Issue seach with the JQL statement also works fine:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That seems to be an authorization error.
Who is the actor for your rule?
Have you changed the API token while updating the rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have not changed the API Token.
Created as mentioned in this post (https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828)
Base64<Mail>:<API Taken created from Atlassian>
Maybe it doesnt work with the Token from Atlassian Account?
Our Environment is on Data Center and I don't think we use Atlassian credientials.
I have tried to create a "personal Access Token" for a Admin User and created a API Token for JIRA as described in the above mentioned post with encodung base64.
Base 64
<Mail>:<Personal access token>
Same error...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I am not using Data Center version and so cannot experiment with something which is in your site configuration. If the suggestions from that linked how-to article did not work, perhaps try:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
I have solved the problem with authentification!
However, I’m currently stuck on transferring values from my custom field "Effort CON" at the User Story level to the custom field "Sum Effort CON (cf[10220])". I’ve attached the error logs for additional context.
Maybe its the Webhook urls thats not working?
"/rest/api/2/search?jql=cf[10220]={{issue.key}}"
cf[10220] is the CF on Epic Level
LogFile:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please remove the expression from the Additional Fields section; that is used when you need JSON to update fields.
And then paste this into your Sum Effort CON field:
{{webhookResponse.body.issues.fields.Effort CON.sum|0}}
The smart value will appear below the field, and then you may select it for usage.
If that does not work, please try using the custom field id for the Effort CON field instead of its name / smart value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
same error:
Not sure why the error message is: ""Value 'ISE-10' for the 'cf[10220]' field is not a valid number."
How can I use die CF Field with cf[10220]?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah...your field cf[10220] appears not to be the issue key, leading to that error message.
In your original question, you were trying to gather the child issues of an Epic to sum the fields. If that is still the case, please change the JQL part of your web request URL to
"Epic Link"={{issue.key}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I trust that with the help of the community, you'll get this to work in Jira Automation!
Just as food for thought: If you're open to solutions from the Atlassian Marketplace, you'll find a number of apps that are more targeted towards your use case. If that's an option, you may want to have a look at the app that my team and I are working on, JXL for Jira.
JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a long list of advanced features, including support for (configurable) issue hierarchies, issue grouping by any issue field(s), and sum-ups.
With these, you can build a view like e.g. this in just a couple of clicks:
Note how the sum-up on the epic updates in real time as we work on the issues below.
This is really just one of a virtually endless number of possible views and reports; you can also view and group by any other issue fields, configure different sum-up styles, etc. etc.
This all just works - there's no scripting or automation whatsoever required.
Any questions just let me know,
Best,
Hannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.