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,559,058
Community Members
 
Community Events
184
Community Groups

How to use the edit object Insight action in Jira Automation

I do not know how you are supposed to specify what object you are changing the attributes on. It makes no sense why it would give an attribute to set but no object to specify. Any thoughts?

 

image.png

 

3 answers

1 accepted

3 votes
Answer accepted
Alex van Vucht (GLiNTECH)
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.
Jun 22, 2021 • edited Jun 23, 2021

Hi Tristan, with the introduction of Insight Cloud into JSM Automation, there are now two classes of rules:

  1. Object-based rules: the "When Object is Created/Updated/Deleted" trigger only
  2. Issue-based rules: every branch and every other trigger

The new "Edit Object" action only works in the first class of rules.  A typical rule is to set a default status for an object, eg.

  1. When: Object is created in Assets schema
  2. If: object matches IQL: objectType = Asset and status IS EMPTY
  3. Then: Edit object: status = Configuration Required

Object-based rules use {{object}} - except within branches, which will introduce an {{issue}} smart value to work with. You can change between the rule classes pretty easily by changing the trigger.

I do bulk updates of objects by adding "Action" and "Result" free-text attributes to object types then using this rule:

  1. When: Object is updated in Assets schema
  2. If: objectType = "Staff Member" and Action = "Update user details"
  3. If/else block: If IQL condition: "Okta ID" is empty
    1. Edit object: Action = "", Result = "Okta ID not provided"
  4. Else:
    1. Edit object: Action = "", Result = "Could not retrieve user details from Okta"
    2. Send outgoing web request: https://<my-okta-site>.okta.com/api/v1/users/{{object.Okta ID}}
      1. Authorization: SSWS <Okta token>
      2. Wait for response before proceeding
  5. If: Advanced compare condition: {{webhookResponse.body.id}} is not empty
  6. Edit object:
    1. Result = "User details retrieved"
    2. Manager = {{webhookResponse.body.profile.manager}}
    3. Manager Email = {{webhookResponse.body.profile.managerEmail}}

Then I just need to do a bulk update of objects and set Action attribute to "Update user details" to trigger an update of user objects from Okta.

 

Tip: If you can't see the object-based actions, you're probably in the Project Automation Administration page. All object-based rules must be global, so you have to go to the Global Administration page to add object-based rules and actions.

(Edit: fixed a logic error in the automation above)

Thank you, that explains it perfectly. 

Hi @Alex van Vucht (GLiNTECH) ,

Just a follow-up question here, do you know if it is possible to apply Edit Object action on a specific object other than the object triggering the rule? I mean either by selecting it manually or resulting from an IQL query.

Thanks. I appreciate your help.

Alex van Vucht (GLiNTECH)
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.
Jun 27, 2021

@Amr HamzaNo, not yet. See https://jira.atlassian.com/browse/JSDCLOUD-10023

I have posted a kind-of workaround at https://jira.atlassian.com/browse/JSDCLOUD-10002 - this can help in some cases,

Like # people like this

Thanks, mate.

Hello @Alex van Vucht (GLiNTECH) , 

 

I'm trying this first class of rules that you suggested but its still not working, the log still doesn't know where to got for editing the attribute.  Screen Shot 2021-09-30 at 3.12.03 PM.png

can you pleas instruct me on how this we should be done?

Hello,

One more addition from us. You can use both Object Trigger and AQL Branch for performing edits on objects. Here are 2 use cases and the automation rules with details as examples:

Use Case 1: Update objects instantly when they are created and set the Jira User.

Use Case 2: Update objects periodically (i.e. once a day or an hour) and set the Jira User.

Hope that these will also help.

Pio

If you have specified the object on the ticket, you can use the Action: Edit Assets field attributes

Suggest an answer

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

Atlassian Community Events