Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,509
Community Members
 
Community Events
184
Community Groups

Copy field value from linked issue or an issue mentioned in issue field

Hi,

Using Automation for Jira, I want to be able to do 1 one the 2:

  1. Copy End Date value from linked issue
  2. Copy End Date from issue key value in "Project Name" issue select field, means that on create, I add a value (Issue key) in the field "Project Name" and I need to pull the value of "End Date" from the issue mentioned in "Project Name"

 

Please advise

Thanks

Itamar

2 answers

0 votes
Simeon Ross
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.
Feb 26, 2019

Hi Itamar,

Thanks for your question. We have a few improvements in our backlog that will enable you to do this easily, https://codebarrel.atlassian.net/browse/AUT-326 and https://codebarrel.atlassian.net/browse/AUT-818.

In the meantime, if there is only one issue linked to it, then your first point is possible with the following smart value:

{{issue.issuelinks.first.inwardIssue.field name}}

That will get the the first linked issue and then you can get the field off it. You could also access the last linked issue with last instead of first. You can use this smart value in the edit issue action.

Cheers,
Simeon [Automation for Jira]

What happens if there are multiple linked issues, is there a way to update those? Another thing, can you use the " in the smart values, for example my custom field name is RMS Modules Affected, and is a checkbox, so when pulling from jql it shows up as "RMS Modules Affected[Checkboxes]", so would the below work?

{{issue.issuelinks.first.outwardIssue."RMS Modules Affected[Checkboxes]"}}

0 votes
Iago Docando
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.
Feb 26, 2019 • edited

The following assumes that you have a parent  issue and when you close that one you want to close all linked issues one by one manually, and automatically copy the value of the field End Date from that parent issue:

  • Trigger:  status transition. from xxx to yyy
  • Action:  edit issue. select the field you want to edit and after that select "copy from parent issue".

To copy the value from a given custom field I'm not sure automation does that. Maybe i can but it escapes to me. What I would do is install the free plugin SIL ENGINE and create a simple SIL script, then I would assign the script to the appropiate transition. I believe this second option allows for more flexibility since you can read and write virtually every piece of information contained within the issue.

Hope it helps :)

Hi,

Thanks for your suggestion, but to the best of my understanding, parent issue is not a linked issue, and is not available for "copy from" action

Iago Docando
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.
Feb 26, 2019 • edited

I know. I described an scenario where the automation options were enough. As I mentioned, for more flexibility I would resort to a custom SIL script. Then you can pick whatever data from whatever issue because it is code you write to acomodate your specific needs.

Give it a try. I've used SIL scripts and custom SIL fields in the past for a number of different things and it has proven to me quite powerful. It has a bit of a learning curve if you have never written code before but it isn't challenging at all. Just follow the documentation and you're good to go. 

Iago Docando
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.
Feb 26, 2019

As an example, you could write a script that not only copy the End Date value to linked issues but automatically transitions them to a closed status aswell whenever one of the linked issues is closed. You could limit that to only linked issues with one particular link type. You could combine information from several custom fields in a number of issues into a new custom field in the target issue, with neat formatting if needed. The options are limitless.

Thanks for you detailed reply.

I do need to set a simple to use system, and "Automation for Jira" if can cope with this need, will be a better solution for me and my customer.

Iago Docando
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.
Feb 26, 2019 • edited

In that case all that I can think of is setting a trigger based on a JQL search, and then copy the value from the field in the issue that triggers the rule. But it may be very tricky.

You should be able to write a JQL that matches any issue linked to the main issue you mentioned, given that this main issue meets certain criteria (for example, status: closed AND has open linked issues). 

Depending on the apps you have installed in your jira instance you'll have access to a number of extra JQL search functions not availiable in the vanilla version and this would potentially allow you to get your desired outcome but, to me, the SIL route seems way more simple.

If this doesn't work for you either I'm afraid I'm out of ideas. Best of luck.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events