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,368,974
Community Members
 
Community Events
168
Community Groups

Copy value from a project issue into another project issue via automation

Edited

I'm using a project where i have several issues with descriptions etc. like a template 

I want to be able to use the automation when I create an issue in a different project the description should be copied from the source project to the new issue into the destination Project.

The source project will serve as a template project.

I can not figure it out how to have the desription copied from  another project via automation.

Please suggest if anyone has any idea.

2022-08-22_18-01-07.png

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall Community Leader Aug 22, 2022

Hi @Baris - You'll want this for your description smart value:

{{triggerIssue.description}}

The problem with issue.description is that you're inside a branch so your issue becomes the target issue so you're then telling it to simply maintain whatever its description is.  By setting it to triggerIssue, you'll copy the value from the issue that triggered the rule. 

Hi Mark,

I've changed the value

{{triggerIssue.description}}

But it is still not copying  the issue description from the JQL that is in the automation

Any other suggestions?1.png2.png

Mark Segall Community Leader Aug 22, 2022

Sorry - I didn't catch a couple things with my first response.  

After reviewing the rule a little closer, I see that you're trying to trigger on the target.  My mistake as I assumed you were cloning from the originating issue.  In this case, you'll want to make the following changes:

  1. Remove the branch.  You're already in the current issue so you don't need that
  2. Assuming your lookup issues action is looking for the source issue that you're trying to grab the description from, you would want to change your smart value to this:
    1. {{lookupIssues.description}}
  1. I removed the branch as you suggested.
  2. Yes the lookup issues is for the source issue. And I want to grab the description of that issue.
  3. I have changed the value but it says not a valid json.

3.png4.png

Mark Segall Community Leader Aug 22, 2022

Let's make a slight tweak:

{{lookupIssues.get(0).description}}

The invalid JSON is likely because Lookup Issues is returning an array.  This change will bring in the description for the first issue in the result set.  I'm assuming your query will always bring in only one issue so this should cover that need.

bmccoy Atlassian Team Aug 22, 2022

Hi

I also noticed you are adding the details in the "Additional fields sections" - this expects a fully qualified Jira edit payload.  Instead, open "choose fields to set" dropdown and select 'description' and add the smart value there instead.

Cheers,
Brydie

Like # people like this
Mark Segall Community Leader Aug 23, 2022

Good catch @bmccoy!  I totally missed that.  @Baris - Under the drop-down "Choose fields to set", select Description.  Then place the value I shared in my last comment there.

Like Baris likes this

@Mark Segall @bmccoy  . Thank you both. That did the trick

3.png4.png

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS

Atlassian Community Events