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

How to use the edit object Insight action in Jira Automation

Tristan Fesmire June 22, 2021

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

 

2 answers

1 accepted

4 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.
June 22, 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)

Tristan Fesmire June 23, 2021

Thank you, that explains it perfectly. 

Amr Hamza June 25, 2021

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.
June 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
Amr Hamza June 28, 2021

Thanks, mate.

Mourad Marzouk September 30, 2021

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?

Like Eugenia likes this
0 votes
Iman Attia May 17, 2023
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