Copying attribute from asset field to jira custom field

Patricia Molina December 11, 2024

I am using automation to copy an attribute to a jira text field. I use Edit Issue action and this is what I use in the field

{{issue.customfield_14701.Part Description}}

The log shows that it was successful but the jira field doesn't have any data in it. I added a Log action to the rule but it also doesn't show that it did anything.

When I just use the asset field {{issue.customfield_14701}} to Edit the custom field, I get the Name of the asset selected in the asset field in the jira issue.

How do I add attribute data to the jira custom text field?

2 answers

0 votes
Marc - Devoteam
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 13, 2024

Hi @Patricia Molina 

Can you try the following:

Store the information into a variable.

Create a variable based on {{issue.customfield_14701.Part Description}} and then use a log action to see what the result is.

If you get a result, then in the edit action set the Part Description, based on the created variable.

Patricia Molina December 13, 2024

Hi @Marc - Devoteam

I tried that but no luck. It still won't populate the field.

Marc - Devoteam
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 13, 2024

Hi @Patricia Molina 

As @Tessa Tuteleers asked, are you on Jira Cloud or on-prem (server/DC)?

Patricia Molina December 13, 2024

I am on Jira DC 9.12.15.

0 votes
Tessa Tuteleers
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 12, 2024

Hi @Patricia Molina , 

Welcome to the community! 

You syntax should be correct. The syntax to get the value of an attribute is

{{issue.customf field name.attribute name}}

 

Good that you are already logging the response to debug, and checked that you can access the object in the field!
If you don't get a value, check the following thing: 

  • Is there an actual value in the attribute?
  • Is the attribute name correct (this is case sensitive, make sure there are no leading or trailing spaces,...)
  • Wheat is the type of the attribute? Just text? For other types you might need to add something to get the correct value. 

Please let us know what you find! 

- Tessa

 

Patricia Molina December 12, 2024

Thank you @Tessa Tuteleers for the help. I did verify that the Part Description in the object does have data and that it is a text field. I also made sure I have the correct name in the smart value.

partDescription.JPG

The automation shows that it was successful

Log.JPG

but the field in the issue is still blank

issue_field.JPG

 

Tessa Tuteleers

Tessa Tuteleers
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 13, 2024

Hi @Patricia Molina , 

just to be sure, are you in jira cloud or on prem? 

Because your attributes have a ":" behind there name, I don't think you are on jira cloud, is this possible? 

If this is the case, you can only get the key or name, see documentation here

If you want to get the data, you will need to get it with an API call. How to do this you can find here, and the specific call is documented here

You can use the key in the call to find the correct object and then find the correct attribute value. 

This is a little more complicated in DC, but normally it can be done. 

- Tessa

 

 

Patricia Molina December 13, 2024

Hi Tessa, I am on Jira DC 9.12.15. I will try the API call and see if that works for me. Thank you!

Tessa Tuteleers
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, 2024

Hi @Patricia Molina , 

How did it work out for you? 

- Tessa

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events