Update custom field based on linked issues

Ashish December 16, 2020

Hello All, 

I need to update a custom field based on linked issues.

Custom field should automatically be updated based on the  issues linked by "Implemented by" 

There should be no manual update.

How can i achieve this ?

I am using JIRA Software cloud 

Thanks for the help in advance

Regards
Ashish

5 answers

1 vote
Guilhem Dupuy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2020

Hi there,

You can indeed implement such a thing using an Automation rule.

The following picture shows you an automation copying the "assignee" field of an issue to all the issues linked by the "relates to" link, which you will be able to adapt to your scenario.

In the example I provide you, the action is automatically triggered each time the "Assignee" field is modified (including creation).

Capture d’écran 2020-12-16 à 11.34.52.png

Let me know if it helped,

Guilhem

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2020

Ashish - can you share the value you see in the drop down for Link Types? Does this link type already exist? 

Ashish December 16, 2020

@John Funk  : 

I have created the automation rule 

Found the lik is implemented by .

Now i want to update the issues in " implemented by " to the text custom field which is created .

How can i do that ?

Capture 1.JPG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 17, 2020

Have your run this rule? Did it work for you? If not, what was the error or result? Can you share the Audit Log? 

Ashish December 17, 2020

@John Funk  it dodnt work for me 

i want to update my "test custom field" with the issue key of issues linked under " implemnedted by "

KID-5, ISD-26, KD-3, ISD-35 

 

How can i do that ?

Capture.JPG

Ashish December 17, 2020

when i run this autoamtion its not updating the issue keys in the test custom field

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.
December 17, 2020

@Ashish 

Please run the rule you created, post an image of the audit log details for that run, and describe what is not performing as expected.  Those details will help people provide more focused suggestions.

Thank you.

Like John Funk likes this
Ashish December 18, 2020

 

@Bill Sheboy @John Funk 

This is the audit log 

I basicaly wanted to update my est custom field with issues keys of issues linked by "implemenetd by "

KD-8 has a linked issue KD-6 , but the custom field is not updated by the issues key KD-6 

What is missing in this ?

Can you please advice.

Capture. 2JPG.JPG

 

Capture.JPG

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.
December 18, 2020

Thanks for the additional information @Ashish 

It appears that the edit is trying to change the linked issues from the branch, rather than the original triggering issue, and so that may be doing something different than you needed.

Before I suggest an alternative... Please describe the problem you are solving by putting the keys to these links in a custom field?  Doing so may reveal another way to solve the problem than the rule you are asking about.

And, links are by nature changeable and so you would need to replace/update the custom field *every time* a link changes to be accurate, not just with your trigger condition.

Ashish December 18, 2020

@Bill Sheboy :  Basically we are trying to automate our confluence , a table is created which needs to be update the values of linked issues " implemented by " every time new issues are

 

PFA screenahot , how i can get the linked issue in KD-6 with relation "implemented by " 

Capture.JPGinked .

So , this is the purpose of automation.

Regards
Ashish

0 votes
Tereza Červinková February 20, 2021

Hello everyone,
I tried to set (I believe) similar thing. Though having different problem.

When an issue is moved from one status to another, a linked issue Gantt End to End should edit - specifically custom field Tracking no. Everything goes well and the log says done and edited. But...the field doesn't change even after days..
Jira automation.png

Jenn Riek
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 25, 2021

@Tereza Červinková you've been selected to receive a gift as a thank-you for being a part of the Atlassian Community! Please email me at jriek@atlassian.com to claim. 

0 votes
Ashish December 29, 2020

@Bill Sheboy : Thanks for noticing 

I have removed the space Capture.JPG

Ashish December 29, 2020

Capture.JPG

Ashish December 29, 2020

Stil the same error..

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.
December 30, 2020

Hi @Ashish 

The smart value syntax such as {{issue.key}} is used within the automation rule, and not in a stand-alone, issue query.  That is why you are seeing that specific error when running  the query separately.

 

Please try this as to confirm it works as a stand-alone filter search:

issue IN linkedIssues(AK-7, "implemented by")

If it does not work, I suggest that you pause and directly contact Atlassian support for assistance as there appears to be another issue: https://support.atlassian.com/contact/#/

 

If it does work, then try this in your automation rule for the lookup issues:

issue IN linkedIssues({{issue.key}}, "implemented by")

That should return the same issues for use in the lookup.

If it does not work, I am confused how to help further and I suggest contacting Atlassian support.

Best regards,

Bill

Ashish January 3, 2021

@Bill Sheboy  here is the result Capture.JPG

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 4, 2021

Hi @Ashish   Please read the rest of my answer above as it suggests some next steps.

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.
December 16, 2020

Hi @Ashish 

Is your link type "Implemented By" a custom link type you added or perhaps a renamed one?  I do not see that one in my default values.

If so, you may need to branch on all link types, and then add an advanced compare condition to check the smart value if the link type manually rather from the list. 

It is odd that all defined link types are not listed in the branch options.

Best regards,
Bill

Ashish December 16, 2020

@Bill Sheboy : Thanks for the response.

 

I got the link " implemneted by " now ..deleted and added it back.

 

I want to copy which are linked by "implemented by " to the text custom field .

 

How can i do that ?

 

There can be mulltiple issue under " implemented by " which i need to update in custom field.

Capture 3 .JPG

Ashish December 18, 2020

Capture 3 .JPG

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.
December 21, 2020

Hi @Ashish 

Thanks for that information.  I believe your rule may be trying to update the incorrect issues, which is why the audit log indicates what you see.  And, you are trying to update a field repeatedly (in a branch) and so replacing the results.

How about this instead: use Lookup Issues to populate the custom field?

  • Trigger: An issue is linked with type of "Design"
  • Action: Lookup Issues using this JQL with advanced JQL
issue IN linkedIssues({{issue.key}}, "Implemented By")
  • Action: Edit the custom field with a list of the keys and list functions:
{{#lookupIssues}}{{key}}{{^last}}, {{/}}{{/}}
Ashish December 21, 2020

@Bill Sheboy  

geting error in 2nd step 

 can you please suugest Capture.JPG

Ashish December 21, 2020

Capture.JPG

Ashish December 21, 2020

@Bill Sheboy  : This is audit log 

 

Capture.JPG

Ashish December 21, 2020

whats happening is i created origial issues KD-15 and linked KD-13 

it didnt not updated KD-15 with custom field values of  implemented by 

Rather it updated KD-13 with custom field values KD-13 

I assocoated SDP-1 with KD-13 and it updated SDP-1 Capture.JPGCapture 1.JPGCapture 2 .JPG

KD-15 is my original issue, in which i want to update values of liked issues "implemented by "

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.
December 22, 2020

Hi...  I am catching up with your messages...

  • It appears you discovered that you missed one right-curly brace, and fixed that, in the Lookup Issues
  • It appears that "implemented by" does not match the name of the link type.  Please check that.

To help provide context for what is happening, please post images of:

  • your current rule and
  • recent audit log for an attempt to fill the custom field. 

Thank you!

Like John Funk likes this
Ashish December 23, 2020

my automation rule 

 

Capture.JPG

Ashish December 23, 2020

didnt update the text custom field with issuekey linked "implemeneted by "Capture.JPG

Ashish December 23, 2020

Capture.JPG

Ashish December 23, 2020

link type Capture 2 .JPG

Ashish December 23, 2020

@Bill Sheboy i have shared the details as requested 

 

Please review and let me know if you need any other info

 

thanks 

Ashish

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.
December 23, 2020

Thanks, Ashish. 

The audit log image you included does not show the rule execution.  Please add that image also.

Next, please run this query in issues and filters to see the results:

issue IN linkedIssues(AK-7, "Implemented By")

 

Thanks,

Bill

Ashish December 24, 2020

Capture.JPG

Ashish December 24, 2020

Capture.JPG

Ashish December 24, 2020

run didnt do anything no update in audit logs 

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.
December 28, 2020

I believe the links are case-sensitive.  Please try the exact spelling and capitalization of your link to learn what that returns.

Ashish December 29, 2020

@Bill Sheboy First of all ..Merry Xmas and happy new year.

 

Does this help ?

 

Capture.JPG

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.
December 29, 2020

Hi @Ashish   Happy holidays to you as well!

Did you notice that your link has a trailing space in "implemented by " when it works with JQL and does not have the space in your other attempt.  Please check to see if there is a space in the actual name of the link as that could be why it doesn't return anything in the rule.

0 votes
Ashish December 16, 2020

@Guilhem Dupuy :

Thanks for the response.

There is no option available for selection linked by "implemented by " in the drip down.

I want to update the linked issue " Implemented by" value to the custom field automatically.

Can you please advice

Suggest an answer

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

Atlassian Community Events