How to retrieve the value of a custom field from a child issue in the parent issue in rules?

Maéva January 24, 2025

 

 

Hello everyone,

I am new to Jira and I would like to create a simple rule that allows me to retrieve the value of a custom child field (here, story) in the audit log via the parent (epic).

First, I created a manual trigger on the epic and then used the "THEN" action to "add a value to the audit log." For the value, I tried many things like: {{issue.Story Ponderation}} or {{issue.child Ponderation}} etc.

I have gone through the documentation, but every time the value in the log is empty.

Do you know the correct formulation to retrieve the value of the child via the parent trigger in the audit log?


 

Thank you for your responses.

2 answers

2 accepted

4 votes
Answer accepted
Manon Soubies-Camy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2025

Hi @Maéva and welcome to Community!

You can use branches to retrieve values from children:

branch.png

Here's what I got in the audit log:

audit-log.png

Hope this helps!

- Manon

Maéva January 24, 2025

Hi @Manon Soubies-Camy
Thank you for your response.

I tried adding the branch for the children, and it works very well.
Thank you so much for your help :)

 

 

Maéva January 24, 2025

Hi @Manon Soubies-Camy 

I have another question to ask you.
Through this test, I wanted to retrieve the value of my custom field from the story and integrate it into the custom field of my epic.
I simply added a "THEN" action to "edit the issue," selecting the name of my custom field in the epic, but unfortunately, the value doesn’t appear. Yet, the value I entered is the same as in the log, so it should return 2.
Do you have any idea why this might be?
Capture d’écran 2025-01-24 153541.pngCapture d’écran 2025-01-24 153851.pngCapture d’écran 2025-01-24 153929.png

Thank you in advance.


Manon Soubies-Camy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2025

Hi @Maéva,

What’s the use case for this rule? It could get tricky if there are multiple child issues.

Based on your screenshot, it looks like you’re editing the child issue, not the parent. Since the ‘Edit issue’ action is inside the branch, it only applies to the child issue.

Depending on your use case, you could try something like this:

copy-value-from-child.png

This would automatically copy the value from the child to the parent issue.

Hope this helps!

- Manon

Maéva February 3, 2025

Hi Manon,

Thank you for your response.

I found how to fix my issue. I had to create a variable on the parent, then set up the child branch to retrieve the data I needed. Upon exiting the branch, I could retrieve it in the parent. This is to calculate the weighting of my epic for the project's progress.

Like Manon Soubies-Camy likes this
0 votes
Answer accepted
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2025

Hi @Maéva 

In order to retrieve the value of a custom field from the child issues, you need to use the lookup Issues action. First add an action lookup issues action with the JQL below

"Epic Link" = {{issue.key}}

then add log action with the smart value as something like below

{{#lookupIssues}}{{Story Ponderation}}{{^last}}, {{/}}{{/}}

or you can use customfieldId directly 

{{lookupIssues.customfield_12345}}

Maéva January 24, 2025

Hi @Tuncay Senturk
Thank you for your response.
I tried what you suggested, but unfortunately, it didn’t work. I think the link between my epic and its story is not an epic link.
I’ll dig a bit deeper to see how this method can work.

Thanks again for your help.

 

Suggest an answer

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

Atlassian Community Events