Hello,
I would like to create a rule to add a comment every time a new component is added or removed.
First I created like this:
But the Jira allows the user add multiple components at once, and the automation add a comment only for the first one.
I tried the 'for each' but I got a comment for all the components, I want only for the added or removed.
Any thoguths?
Hello I found a solution for my problem.
Created separeted rules (easier for now)
1. Create a variable to receive the new values for the field components:
{{#changelog.component}}'{{toString}}', {{/}}
2. Add a replace function to remove the empty items (this happens because the person can add and remove items in the same action) and substringBeforeLast to remove the last comma.
{{updatedComponents.replace("'',","").substringBeforeLast(",")}} component(s) added by {{initiator.displayName}}.
NOTE>
toString when I want to check the new items added;
fromString when I want to check the new items added;
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.