Create linked issue - automatic data point
Asked by Jeremy_Rampe:

I am trying to create an Automation that says:  

When linked issue is created, automatically add this data point to linked issue.

<br />

I've tried it a few different ways and can't get it to work.

<br />

<br />


Answers:
author: John Funk
body: Hi Jeremy,

I assume your problem is that the CX field is not getting updated as you like. Is that correct? Are you copying the value from the trigger issue? Can you share a screenshot of the details of the edit issue action for that field?

comments: author: Jeremy_Rampe
body: Hey Josh,

The data point isn't set on the "parent issue". I am just trying to add it to the linked issue.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/329248i3EA63D36E659D226/image-size/large?v=v2&px=999 "image.png")


author: John Funk
body: Please show the details of the edit issue action.


author: Jeremy_Rampe
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/329253i98CB7E5EB9494514/image-size/large?v=v2&px=999 "image.png")


author: John Funk
body: Which field are you trying to set?


author: Hala ElRoumy
body: Hi Jeremy,  

Can you please share the rule that you tried working on to see where the problem is?  
And maybe a screenshot of the audit log showing the error you encountered if any.  

Thanks,  
Hala

comments: author: Jeremy_Rampe
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/329238i6782405256124B31/image-size/large?v=v2&px=999 "image.png")


author: Hala ElRoumy
body: Thanks, Jeremy. Can you also send a screenshot of the audit log showing an example of a rule execution? Are you getting any errors?  

Does the CX field exist on both issues?


author: Jeremy_Rampe
body: The Audit log only shows creating the issue. The CX field does exist on both


author: Hala ElRoumy
body: Hi Jeremy, It will help a lot to see the actual error message in the audit logs.  

However, since the field doesn't exist on both issues my assumption would be that the the destination issue (referenced in the branch) where you are trying to set the field is the issue, doesn't have this field.  

**How can you tell which is the source and the destination issues in the linked issues?**   
The [issue linked](https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Issue-linked) trigger always uses the Outward link types as the main issue/source issue. For example "is blocked by" link type.  

You can check the issue linking settings to learn what is the outward link for the link you are using in this test.  

Therefore, there are two issues:  
- Source issue (the main branch of the rule will execute for this issue and you can access it via {{issue}}  
- Destination issue (to perform actions on this issue use a 'Related branch', you can also access it via {{destinationIssue}}  

You can add a log action to print out {{issue}} and {{destinationIssue}} in your test.  

For your rule to work, the destination issue (inside the branch) has to be the issue that has the CX field.   

To do so, you can add some conditions for example to make sure that you are always setting the CX field on the correct issue.   

Let me know if this helps :)  

Thanks,  
Hala


Tags: cloud

jira-service-management

jira-service-management-cloud