Automation : Copying a Custom Field into the Description Field

Jenn Molyneaux August 9, 2021

Hey Atlassian Community - 

I apologize in advance as I'm not a programmer and I'm struggling a bit with the syntax of my Automation rule. I hope that this is okay to ask here. I've seen several articles that are similar in nature to what I want to achieve but not exactly the same so I've had to tinker around with the syntax. I also looked at the RESP API doc but I'm going to be honest, it's a little over my head. That being said, I haven't been able to get it working. 

I have a custom field named 'Bug Description'
When a 'Bug' Issue Type is moved to become a 'Story' Issue Type, I want to copy the contents of the custom field into the 'Description' field. 

This is what I've got right now - 

Screen Shot 2021-08-09 at 3.42.11 PM.png

If someone could review the syntax and let me know what I'm doing wrong, I'd be incredibly grateful. 

 

As always, thank you so much for your help!

2 answers

0 votes
Julien Peyrade @ Elements
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 10, 2021

Hello @Jenn Molyneaux 

Since you are asking about Automation, I may be out of line, but just in case this could interest you I would like to suggest the app I'm the Product Manager of : Elements Copy & Sync.

Your use case is basically why we built the app for.

We tried to be as straighforward to use as possible, which is why we opted for a no-code approch to our configuration. For example, if you want to insert the text custom field into the description field, you can simply use a select list which lets you decide which field to insert : 

insert-field.png

Clicking on Insert automatically add the field in the Description : 

inserted-field.png

I hope this is helpful in some way.

Do not hesitate if you have any question.

Regards,

Julien

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2021

Hi @Jenn Molyneaux

You are very close.  I suggest the following:

1. Remove the additonal options

2. Update the description field with a smart value. {{issue.customfield_10061}}

Or you can try: {{triggerIssue.customfield_10061}}

Regards

Jenn Molyneaux August 10, 2021

Hi Fabian - 

 

Thanks for the response! I really appreciate the help!

I removed the additional options that were at the end of the code. I used the smart value like you provided in step #2 but that didn't work so then I tried {{triggerIssue.customfield_10061}} instead but that also failed. 

 

I tried using the filed names to see if they would work instead - 

{
"fields": {
"Bug Description" : "Description"
}
}

 

That failed too but I received a much more descriptive error - 

Unknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration. Fields ignored

  -Bug Description (customfield_10061)

No fields or field values to edit for issues (could be due to some field values not existing in a given project):TEST-522

 

I do not have the 'Bug Description' field in my Story Issue Type. Is that why this is failing?

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 10, 2021

Hi @Jenn Molyneaux

Could you share your entire rule, I just want to understand which trigger you are using to catch that a Bug was moved to Story type? Are they from different jira projects?

Just a Suggestion, many of my clients, instead of moving items, they actually create a new issue (story) and linked to the existing bug.  That way you can keep all the information as bug and have the development team work on the story.  

Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2021

I do not have the 'Bug Description' field in my Story Issue Type. Is that why this is failing?

Yeah if the Bug Description doesn't exist for the Story issue type, then the field won't be visible. You can either do what Fabian suggested (copy the issue instead of the moving) or if you add the "Bug Description" to the Story issue type, you'll be able to copy it across
Jenn Molyneaux August 13, 2021

@Fabian Lim - Here is the entire rule - 

 

Screen Shot 2021-08-13 at 10.52.13 AM.png

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 13, 2021

Try Issue moved action instead. And use an issue field condition to pick that the issue type is a "Story".

Details:

images.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events