Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

 

1 answer

1 accepted

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.

Like # people like this

Thanks, mate.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Atlympic Event: Jira Service Managemnt

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

270 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you