Hi,
We need to create a rule
I need to create a rule that is capable of adding a faithful custom called Story Point (Portfolio) of all the tasks of the Story and Task type, and the sum is displayed in a field called Current Story Point, located in the Epic.
@Ismael please see my post above ^^^^
To update the parent issue with the sum of a custom field, you would need to gather the issues using the REST API, called from the Send Web Request action.
Here is a how-to article for calling the REST API from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
I believe this is the REST API endpoint you need: https://docs.atlassian.com/software/jira/docs/api/REST/9.13.0/#api/2/search-search
Finally, you may need to use the custom field id rather than the field name. This how to article will help identify that value for your field: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html
Hi @Ismael -- Welcome to the Atlassian Community!
Adding to Trudy's answer...
If you want to sum a custom field and save the result in another issue, you cannot use the Lookup Issues action; that action does not support custom fields for the Data Center version of automation rules yet: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
The possible workarounds depend upon your rule structure, and you likely would need to call the REST API issue search with JQL, using the Send Web Request action, and then sum the field from the web response.
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.
Hello @Ismael
Welcome to the Atlassian community.
Is that the entirety of your rule; 3 components?
If so, one problem is that the {{lookupIssues}} list is only populated if your use a Lookup Issue action. You don't appear to have one of those. Refer to this page for details on the Lookup Issues action.
https://confluence.atlassian.com/automation/jira-automation-actions-993924834.html
Second size is not the correct function so sum up numeric values from a list of issue. The correct function is sum. Refer to this page for more information about functions you can use with lists of issues.
https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html
Note that the above page references are for the latest version of Jira Data Center. You should change the version selector in the upper right corner to the version that matches what you use to get the documents that align with that version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ismael
@Bill Sheboy provided you with a solution path to explore - using the Send Web Request action in an Automation Rule to call the Rest API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there no way to do this with automation rules?
What is the technical reason for Jira Software Data Center 9.14, for not being able to do this with automation rules?
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.