Background:
I'm trying to do a very simple POC whereby a user goes to the service desk, requests access to the GitLab SaaS application, the ticket has some automation behind it that first checks if we have licenses and then if it does, does license count = license count -1. So in theory that license is then allocated to that user.
My setup
I've created a new Asset object Schema called 'SaaS'
Inside the Schema Tree I've created 'SaaS Application'
I've then created a new Asset Object called 'GitLab'
I've added a new attribute to this Schema called 'License Count' (integer)
I've set the GitLab object to have 100 under License Count.
Automation so far:
- When: Issue Created
- If: Request Type equals SaaS Gitlab Access
- Then: Lookup Objects (Schema: SaaS) (Query: key = SAAS-4)
- IF: Matches
- {{lookupObjects.License Count}} greater than 0
- Then: Add comment to issue
- Comment: 'Licenses Available, allocating'
- And Then: Edit Object
- Choose attributes to set: License Count
- License Count: {{lookupObjects.License Count.minus(1)}}
It all works until the edit object part, for the life of me I cannot get the asset object to change value.
I see this error on the edit object:
'One of the following needs to be produced earlier in the rule by the trigger or with a 'for each' branch for this component to work: CMDB object'
Anyone tried this? Or have any suggestions, I was hoping this would be simple!