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

Copy Assets object attribute to issue custom field via automation

Hi guys,

 

I'm trying to fetch object attribute and copy to custom field in the same issue, I'd like to use automation, is it possible?

There's a post-function that could perfectly get it done, unfortunately, this method only exist in Server/DC.

I know it's probably easier with groovy scripts, but it will not fulfill customer's expectations for now.

 

Kind regards,

Carlos

1 answer

1 accepted

2 votes
Answer accepted
Gideon Nolte _Jodocus_
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.
Jan 17, 2023

Hi @Carlos Chang

this can be done with Automation for Jira with the "Edit Issue" action and SmartValues

If the Object is present in a customfield of the issue, you can use the SmartValue {{issue.customfield_XXXXX.objectAttribute}} (e.g. {{issue.customfield_10500.Name}}). If the object is not present on the issue, you can use the "Lookup Object" action to get all objects specified by AQL. To access these objects' attributes, you can than use {{lookupIssues.objectAttribute}}.

Hope this helps. Feel free to let me know if you have any more questions

Greetings
Gideon

Hi @Gideon Nolte _Jodocus_ 

SmartValue works! Genius.

 

Kind regards,

Carlos

Like Gideon Nolte _Jodocus_ likes this

Hi @Carlos Chang 

I am trying to copy object's attribute (manager) to a custom field (User Picker (multiple users)). Manager attributes have plural individual account. 

supportgroup.jpg

 

I added an automation rule, but it doesn't work. Can you help me?

2023-03-22 16 22 41.jpg

Gideon Nolte _Jodocus_
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.
Mar 29, 2023

Hi @jun lee ,

two things you would need to fix here: 

1. Use the "normal" way (not the Additional fields option) to set the field value. It's the field which with the placeholder "Type to find matching users". In there you should be able to set the value via a Smart Value.

2. Given that customfield_13809 holds an object of type "supportgroup", you will have to provide the "ENM_USER_MULTI" field with a list of account IDs rather than objects. What I mean by this is, that the current Smart Value `{{issue.customfield_13809.manager}}` will evaluate to the manager object(s) rather than the mangers' accounts which will most likely be stored in an attribute of type "User" on the "Manager" objects. Let's assume that the attribute which holds the manager's user  is called "Account". Then the correct Smart Value would be `{{issue.customfield_13809.manager.Account}}`.

Hope this helps. Let me know if you have any more problems with that.

Greetings
Gideon

Like jun lee likes this

Hi @Gideon Nolte _Jodocus_ 

I tried second method like 

{{issue.customfield_13809.manager.Account}}

{{issue.customfield_13809.manager.Name}}

{{issue.customfield_13809.manager.email}}

However, Audit log is success althought it doesn't work

 

2023-04-04 15 13 29.jpg

 

2023-04-04 15 19 04.jpg

 

 

2023-04-04 15 18 37.jpg

Gideon Nolte _Jodocus_
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.
Apr 11, 2023

Hi @jun lee ,

could you provide me a screenshot of the attributes for the manager object type. Is the "email" attribute of type User? Is there an attribute on the Manger Object Type that is of type User? If yes, try using that.

Greetings
Gideon

Hi @Gideon Nolte _Jodocus_ 

Yes, email is the attribute of the Manager object. 

2023-04-13 15 43 12.jpg

I am trying with different field.  I added "department" attribute to the "manager" object, made a custom filed 13901 (object type), and I added automation rule as {{issue.customfield_13901.department}}

2023-04-13 15 45 12.jpg2023-04-13 15 44 24.jpg

 

However audit log of the automation rule was failed.

2023-04-13 15 51 18.jpg

 

ENMCOMM-379 issue has custom field 13901 ("ENM_manager") and custom field "ENM_Department"

2023-04-13 15 50 13.jpg

 

Suggest an answer

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

Atlassian Community Events