Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rule to update a Parent field

Ann Rumenapp
Contributor
January 7, 2025

I'm really needing advice on automation rules here, I can't even get the log action to show me the value of a custom field..

Goal: Using Jira Premium with the Hierarchy set to OKR -> Epic -> Feature -> Story -> Subtask.  CCR is a Feature issuetype.  I need to write an automation rule so that when a CCR (Feature) is approved and Proposed End date is populated; The parent (Epic) card 'Updated Planned End Date' field is updated with the Feature (child/CCR) Proposed End Date value. 

Help needed: How to get Proposed End Date to show in the audit log?  Is this the right logic to update a parent field (Updated Planned End Date) with the field value from a child card (child card field is Proposed End Date)?

Here is the rule:

image.pngimage.png

Here are the audit log results:

image.png

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2025

Hi @Ann Rumenapp 

First thing, smart values are name, spacing, and case sensitive.  And, they often do not exactly match the displayed name of the field on the Jira pages.  When an incorrect smart value is used, it just returns as null / empty.

To identify the correct smart value (or custom field ID) for your field, please use this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Next, when you branch to the parent to copy the field from the trigger issue, please use that smart value as the source.  For example:

{{triggerIssue.yourSmartValueName}}

 

Kind regards,
Bill

Ann Rumenapp
Contributor
January 7, 2025

Clearly I have no idea how to read JSON code.  The links article for how to find the smart value of field says to use a URL (https://<yourinstanceurl>/rest/api/2/issue/<issuekey>?expand=names).  When I replace <yourinstanceurl> with my instance and <issuekey> with an issue key, the result is a the following error: 

Hmmm… can't reach this page
comerica.atlasssian.net took too long to respond

Any other suggestions?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2025

Here are some simplified steps for that how-to article:

  • find an example issue which has your field, such as CET-93
  • with a new browser tab, enter this URL, substituting in your Jira URL and the issue key
yourJiraURL/rest/api/3/issue/yourIssueKey?expand=names

From what you describe, that would be this:

https://comerica.atlassian.net/rest/api/3/issue/CET-93?expand=names
  • after it loads, search on the page using the field name you know, such as with the Control-F and type in the field name
  • observe what you find...
    • the custom field ID should be on the left and the smart value will show the correct spacing / capitalization for the field
  • then try using the smart value or custom field ID in the write to the audit log to confirm the value:
    • {{issue.yourSmartValue}} or {{issue.customfield_12345}}

 

Suggest an answer

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

Atlassian Community Events