I'm looking to automate copying the value of a custom field Version In Project X, to the same Version field in Project Y.
The two issues in their respective projects are not linked. But I have a field Name in both projects which already contains the same value.
Where the value in Name matches between the issue record in X and Y I want to copy the value of Version from X into the Version field in Y.
It's possible that in Y multiple records with the same Name exist, I would like all of them to be updated.
Is this possible using automation & if so how?
Hi @Craig ,
I tried to create a rule that fullfills your requirement (as far as I understood your need correctly ;) ). Please be aware that your rule need to be a multi project or global rule as it needs to operate across 2 or more projects.
By using smart values the rule can check for issues in project X containing the same value as the (trigger-)issue in project Y. Important here is to think of the trigger (i just picked a manual trigger, that is something you have to figure out when your rule should be triggered to run).
Below is a screenshot of what I built.
Maybe for better understanding:
Hope I got your requirement right and this helps.
Best
Stefan
@Stefan Salzl I have two issues on two different projects (ProjectA and ProjectB) Linked. I would like to copy the Summary field on ProjectA to CustomField on ProjectB for every linked issue. I am trying to figure out where you set up what you did in the screen cap you provided. I do not understand where you did this. Can you walk me through how I can do what I'm trying to do and where to set it up? Thank you in advance for any help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kdickason
What you see in the screenshot is the Automation for jira (A4J) feature. If you are on jira cloud this is feature is available by default. If you are not familiar to it yet I would recommend to read through the basics and trying to build some examples:
https://www.atlassian.com/de/software/jira/guides/expand-jira/automation
Please let me know if you have any further questions.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
right now A4J is only part of jira cloud. On DC/Server there is a paid add-on but this is planned to be added into Jira (same as in cloud) within the next month.
see following link:
https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-will-be-included-in-Jira-Data-Center/bc-p/2042669#M6578
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kdickason
In case Scriptrunner is installed in your Jira Instance --> that would feasible too to solve this use case.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, we have scriptrunner! I am not a strong scripter, though, and their built-in scripts did not handle what I need to do. Ultimately here's what I need. I have two tickets on two different projects (Project A and Project B) that are linked by an Linked Issue. I need the Summary field from Project A to populate a custom field on Project B for any tickets that are linked together. Is there any chance you could help me write this script or give me any direction?? There will only be 1 Link from Project B to Project A. So there's no chance Project B's ticket will have multiple Project A links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kdickason ,
unfortunately I‘m not very proficient with scripting either. I just started my journey and asked similar question. Nevertheless I got very good hints to start from in the following post:
Just did small steps with try‘n‘error.
Hope this also gives you some starting input.
Best
stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stefan Salzl I have the same troubles but I don't seem to get the same outcome as described. The scenario is quite similar:
1. The trigger issue is from project A. Let's name the trigger issue to be "ISS-A".
2. The source issue "IMP-B" is from project B (from screen its IMP). Redacted for confidentiality.
3. I want to copy the fields from the issue in project B to the issue in project A.
If I follow the same triggerissue smartvalues as described, what happens is that:
1. It will copy the values from the ISS-A to IMP-B. The results are the opposite of what I wanted. I wanted to copy the values from IMP-B to ISS-A.
I attached the example of my rule below. I think I am very close to achieving what I want, but just stuck for couple of hours - maybe i'm doing this more complicated than it already is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ivor
as your rule is using a branch it changes it´s context/scope of action to the issues that are found by the branch-condition:
I would suggest to
One more thing that comes to my mind:
The JQL seems a bit generic. Can you be sure that there is only 1 issue in project B with this email adress in the field?
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the advice, I did the modifications based on your response and it now works. This is the final flow that works for me. Sharing the screenshot so that might benefit others.
Tbh, what I was doing was a workaround on JSM to store referential data of user information by importing that into the IMP project (which is imported manually) due to limitations on integration with an external DB/app. Each record is confirmed to be a unique, so the jql query always returns only 1 record.
I guess if there are several records that are returned by the JQL, then we probably need to set the array value to [0] to only retrieve the first object? Though it doesn't impact my use case, it would be very informative to be able to do this on datasets that have more than 1 record returned.
Also kinda annoying that JIRA isn't able to validate smartvalue expressions, autocomplete or have a expression builder built directly into flow; MS with their power platform is already ahead of atlassian in this respect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl ,
I have the same issue like Ivor had, and I've tried your solution to use the lookup action, but unfortunately the Lookup Issues action does not exist for the Data Center versions of automation rules.
Do you have another solution for DC?
Thanks,
Hila.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hila Ben Halevi - welcome to the community
the simpliest way that comes to my mind would be to call the jira api (search endpoint) with the „send web request“ action. see the link below:
You could then use the response of the api call with the smart value
{{webResponse}}
guess for the issue the whole smart value would be (not 100% sure, please double check)
{{webResponse.body.key}}
Best
Stefan
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.