Hi all,
I'm trying to do an automation when a specific link is created between two predefined types of issue (A and B), I copy the components from issue A and paste them into issue B.
To do this, I created a lookup using the JQL query: issue in linkedIssues({{triggerIssue.key}}, ‘is mitigated by’) then I created an edit issue by modifying the component field with the following smart value: {{lookupIssues.components.name.distinct.sort.join(‘,’)}}
I tried several combinations, but I never managed to copy/paste the components. Either I've got an error "Couldn't edit the Components field - the component doesn't exist" (the issues are in the same project and share the same predefined components), or I have no action happening.
Hello @Valentin CHAPLET ,
Welcome to the Community !
You've already did the conditions; additional you may need to do as below:
- Advanced Branching as"{{destinationIssue.components}}" and variable name as 'comDetails'
- Edit issue and add below in additional fields:
{
"update": {
"components": [{
"add": {"name": "{{comDetails.name}}"}
}]
}
}
In above, we are adding components to the exists, not overwriting them !
Note: Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}, and to access the link type, use {{linkType}} (e.g. {{linkType}}
Hello @Piyush Annadate _ACE Pune_ ,
Thank you for your reply, the explanation is really clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May I somewhat relativise the assertion '{{issue}} will always refer to the source issue'?
Actually, you could create a branch for linked issues and have that branch run through all the work items connected through a certain link type like 'relates to' or 'is blocked by'. In that case, to my knowledge, {{issue}} will refer to the issue(s) the branch is working on, and the triggering issue would be the 'triggerissue'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.