Hi there,
we're currently setting up our future JSM instance and want to use JSM assets for our support group management. Furthermore we want to use these asset objects to sync them to groups, in order to use them also for permissions and stuff.
So, what I basically want to POC is the following:
- a new support group is created (new object of object type support team) -> this triggers an automation that creates a new group "permission-group_{{object.name}}" via web request
- a support group is removed -> automation to delete a group
- user is added or removed from the group (field {{object.members}} is changed, which is a user field with unlimited cardinality) -> user is added or removed from the group accordingly
Create and delete is easy, no questions. But I really struggle with the update use case.
Problem 1: since in the trigger I cannot pick a particular field to be monitored, I have to use an if-condition that checks somehow, whether the current value differs from the previous value of my members field.
But I didn't find any smart value function being capable to give me this information. I tried several I know from "normal" Jira automations (fieldChange, previous, diff) but nothing seems to work.
(side-problem: both the trigger description and some documentation-based AI-answers suggerate that in the trigger I should not only be able to pick an object type but also a field, but I can only pick an object type. Is it the same for you guys?)
Problem 2 (more or less an iteration of problem 1): when I found out whether there's a differrence between before and now, I need to know what exactly has been added or removed to sync it to the group. Needless to say that the change can be affect 1..n users.
Do you have any ideas how to solve this?
Thanks and best regards,
Stefan