The sequence is:
1 - When work item is updated
2 - For Linked Work Items (Blocks links)
3 - *** Need to assign the linked issue.summary to a custom field in the trigger issue
======================
This all boils down to:
TmpIssue = Triggering Issue;
TmpStr = "None";
For List of linked tickets {
If desired ticket found then {
TmpStr = linkedTicket.summary;
break;
}
}
Tmpissue.someCustomfield = TmpStr; // assigning the linked ticket summary
================================
But this kind of thing isn't supported?
https://jira.atlassian.com/browse/JIRAAUTOSERVER-985
What do you do instead?
===============================
I have tried:
Creating variables but the scope issue from JIRAAUTOSERVER-985 means I always end up with "None"
If tried doing a JQL lookup for the original trigger issue and assigning the summary recorded in a variable but I seem to be stuck in the context of the "For list of linked tickets" rather than the result of the JQL lookup.
=============================
Anyone have ideas?
Hello @Howard Thompson
Welcome to the Atlassian community.
Are you anticipating finding multiple linked work items that meet your criteria or just one linked issue?
If you anticipate finding only one, what would you want to happen if you found more than one?
You could do something like this:
When work item updated
Lookup Issues:
JQL: issue in linkedWorkItems("{{triggerIssue.key}}", "blocks")
Advanced Compare:
First Value: {{lookupIssues.size|0}}
condition: equals
Second value: 1
Edit Work Item (this will edit the trigger work item)
Field to set: <your custom field>
Value: {{lookupIssues.first.summary}}
That works if you expect to find only 1 linked work item. If you find only 1, then it copies the Summary from the linked work item to your trigger work item. If it finds 0 or more than 1, then it does nothing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The goal is the triggerissue varBlockedStoryName field being assigned the Blocking Issue Story name. Yes, for the sake of this example, lets assume there is only one but if multiples existed and the name was over written that would be fine. THE PROBLEM is that the triggerissue is not update, instead the block linked story ticket from the JQL is updated instead. So, in the "Edit work item fields", how can we set the triggerissue instead?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you add a Create Variable (tmpStr), assign the linked blocking summary, then lookup the original trigger issue and finally try that Edit work items again only this time assiging the tmpStr to the issue.summary. Then it still doesn't work. Once again, "issue" references the block linked ticket from the original For JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Howard Thompson
The problem is when you use a branch then the actions taken within that branch will be taken against the issues identified in the Branch component.
The example I provided does not use a branch.
If you want to accommodate finding multiple linked issues, and overwrite the trigger issue summary with the Summary of the last linked issue, then you could use this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Thank You! You have solved this problem. I have other problems but you have freed me on to my next one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.