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,551,708
Community Members
 
Community Events
184
Community Groups

How to obtain newly created Assets object in the automation rule

When you create a new issue in the automation rule, there's smart value {{createdIssue}}, which can be used further in the rule. But when you create Assets object, there's no smart value for a newly created object. What can be done? 


 

Let's assume you've got service management project prepared for your HR department. One of the requests is called Employee onboarding and the form contains these fields:

  • What is the employee name? (Summary)
  • What date does the employee start? (Start date)
  • What is the employee e-mail? (Employee e-mail)
  • Where is the employee located? (Employee location)
  • ...

jsm_form.png

After the form is submitted, your HR department starts to work on different things for the newcomer.

jsm_issue_detail.png

As a one of the steps (for example after the issue is resolved, i.e. transitioned to Done) you want to add this employee to Assets, where you have database of your employees (which means you have created appropriate object scheme called HR and object type called Employee in it).

assets_object_scheme.png

Let's create the automation rule.

First step will be to create an Employee object - for this Create object action can be used like this (trigger issue data are used):

automation_rule_create_object.png

Now what we would like to do is to store the newly created object to the issue, so that we have all issues connected to the Employee object visible in the Linked issues section in the object's detail. For this we've prepared custom field Employee with simple configuration:

custom_field_employee_configuration.png


Because there's no smart value for a newly created object, we use Lookup objects action - we search for a newly created object in the database. If the object has some unique value (in our case e-mail), the result will be only one. So, in our situation we will use query:


objectType = Employee AND "E-mail" = {{triggerIssue.Employee e-mail}}

automation_rule_lookup_objects.png

The last step is to store the found Assets object in the custom field:

automation_rule_edit_issue.png

jsm_issue_detail_with_object.png

assets_object.png


Summary

If the object, which you have created in the automation rule, is somehow unique (one attribute or combination of more attributes), you can search for this object using Lookup objects action and use the smart value {{lookupObjects}} from the result.

1 comment

Tomislav Tobijas
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.
May 16, 2023

Cool article 🙂 Thanks for sharing!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events