Please,
I want to grab the linked issue status and show it on a specific custom field.
How can I grab that information, and in addition, the "Assignee" field?
Hello @Bruno Xavier
You can use an Automation Rule to get information from a linked issue and add it to custom fields in the issue to which it is linked.
Do you have any experience with Automation Rules? Here is the home page for the documentation:
https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/
Thank you Trudy
I am learning as my project requires, and it is new for me.
Let me check this link :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This scenario is a little more complicated because you are working with linked issues. Are the issues in the same project? If not that adds another element that needs to be considered when creating the rule.
Don't hesitate to ask any questions that come up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No that is not the same project.
I have been trying the entire morning with no success, which just makes the custom field "empty" let me paste here what I did
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing - if the issue you want to update and the linked issue are not in the same project then you need to create a multiple-project rule. You have to do that from the Global Automation page.
Next - for testing purposes using a Manual Trigger is a good idea. Eventually I assume you want that changed to a trigger that will happen automatically, but we will start with the manual trigger. Additional steps and other changes to existing steps may need to happen when the change to an automated trigger is made.
So, let us assume for now that you are manually triggering this rule from the issue you want to update.
Next - we need to figure out which of its linked issues is the one we want to get data from. What is unique about the linked issue that can help us identify it?
Once we figure out what the criteria is for that one linked issue, we need to add a step to get the linked issue. The exact step is going to depend on the criteria we use.
The smart value you tried to use here is not a real smart value. Were you referencing some documentation or post that made you think it was?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, that is very helpful, so to answer those points:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand your answers correctly, when deciding on which linked issue you want to get the status from:
1. The issue will be linked using a unique link type,
-- Is that the "is blocked by" link, as shown in your image?
2. The linked issue could be any one of multiple projects,
-- In that case all the projects that might have either the issue you want updated or the linked issues need to be specified in the Rule Details > Scope.
3. There could be more than one linked issue from that project
-- But could there be more than one linked issue from that project that uses the "unique link type"?
If there is more that one linked issue that might match the conditions then what do you do manually now to determine how to set the custom field value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. The issue will be linked using a unique link type,
-- Is that the "is blocked by" link, as shown in your image? yes
2. The linked issue could be any one of multiple projects,
-- In that case all the projects that might have either the issue you want updated or the linked issues need to be specified in the Rule Details > Scope.
3. There could be more than one linked issue from that project
-- But could there be more than one linked issue from that project that uses the "unique link type"? not defined yet, if that makes easy I can do in that way
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
3. There could be more than one linked issue from that project
-- But could there be more than one linked issue from that project that uses the "unique link type"? not defined yet, if that makes easy I can do in that way
What exactly are you trying to accomplish in this scenario?
You said you want to grab the Status of a linked issue and put it into a custom field.
If you want to consider more than one linked issue in this process then you must define what you would enter into the custom field based on having multiple linked issues with different status values.
If you want to base the update on one and only one linked issue then there must be a method to identify that linked one issue you want to use. It must have some combination of information that makes it unique. This could be some combination of
- the link type used (i.e. "is blocked by")
- the project in which the linked issue exists
- the issue type of the linked issue
- some other element of the linked issue that would distinguish it from other linked issues that match the other criteria
Knowing so far that you want only the linked issue(s) that use the "is blocked by" link, we can start by saying that you need to use the Lookup Issues action to get a list of all the linked issues that use the "is blocked by" link. The Lookup Issue action uses a JQL to retrieve issues.
From the Advanced Searching - JQL Functions page we know that we can use the linkedIssues() function.
Find issues that are linked to a particular issue via a particular type of link:
issue in linkedIssues(ABC-123,"is duplicated by")
We can get the issue key for that statement using a smart value. {{issue}} references the issue in context at a given point in the rule and the issue in context may change as you progress through the rule. You can use {{triggerIssue}} to make sure that you reference the issue that caused the rule to be triggered. You add the field name that you want from that issue into the smart value. Double curly braces surround the smart value. You can find more information on available smart values here.
issue in linkedIssues({{triggerIssue.key}},"is blocked by")
The result set from the JQL will be stored in a special list smart value named {{lookupIssues}}
If there is a scenario where there might be multiple issues in the result set, and you only want to consider one of those issues, then we need another criteria we can add to the JQL to zero in on that one issue.
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.