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,462,996
Community Members
 
Community Events
176
Community Groups

Copy Jira user from Assets object attribute into assignee field via automation

Hello fellow Atlassians,

I'm trying to implement a substitute regulation in case the assignee or approver of an issue is out-of-office and would therefore like to change the assignee of an issue via a scheduled Automation which JQL-selects issues that haven't been updated in the last three business days.

Since we're doing this escalation along the hierarchy, we're using Assets to use the referencing of deputy/substitute or manager of our users. Every user is represented by an object which is imported from the AD. During import, we're matching the CN to fill in the Jira user attribute of each object/user. 

Not being able to use {{lookupObjects}} in Automation (we're on DC) got me to using an Assets custom field, which gets auto-populated with the referenced (user-)object of the current assignees Assets object via assign issue scope. Let's call this field "Manager of assignee" or "customfield_11301". The (user-)object displayed in the field "Manager of assignee" also has its corresponding Jira user filled in as attribute "JiraUser" like any other user with Jira account too.

The Automation will run scheduled and check a JQL statement as described. Then it should edit the issues assignee via a smart value, but I cannot figure out how to do so.

Result is, that the issue gets unassigned and the "Manager of assignee" field cleared respectively.

I tried different smart values, the most logical to me is {{customfield_11301.JiraUser}}

2022-12-07-15_31_59-assignuser.png

I tested the automation with two accounts which do have admin permissions in the project, because we're also using an issue security scheme within the project. One account is deputy of the other one, who is assignee of the ticket. But still no success. The Automation rule states SUCCESS and does not give any information on why it is not working.

Is there an attribute missing in the Assets dot-notation or do you see any other mistake I made? Maybe someone even implemented a substitution automation in another way...

Best regards
Konstantin

 

3 answers

Hey @Konstantin Weber - SVA there is a post function called "Assets post function" where you can copy a value from an Assets object custom field to a Jira field of the same type, e.g. user picker or maybe it even works with as Assets object field).

You could use this to populate the Jira issue field and then run your scheduled automation on this field?

Script listener can help you in this case.

We can extract data from insight object, then get the value of specific attribute then pass it to the assignee of the current issue.


0 votes

Hi @Konstantin Weber - SVA ,

I would suggest to reach out to Atlassian Support, as it's hard to tell why things are not working for you without looking into details.

Best regards,

Maksim

Hi Maksim,

since Atlassian Assets on premise is only supporting getting the key or summary (label) of an asset via Automation, I had to change the label of the employee object to the CN, which is also used for usernames in the instance. This way I could Automation to parse the {{customfield_11301.summary}} (object label and username) into the field assignee and by thus change its picked user.

Hi Konstantin,

you are right. Atlassian Asset on DC only supports summary and key. It is mentioned in this Smart Values article for Insight objects: https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html.

After the takeover, Atlassian probably didn't change anything.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events