Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to fetch the fields of one issue into another issue?

Pranita Warik September 5, 2020

I have a project Capex Funding. It has fields like

Plant, Location, Cost etc.

I have another project Capex Commisioning, here I am using Issue Picker as a customfield to link to the issues of Capex Funding and select one of those. eg. FUND-1

Now, when I select the FUND-1, I want the values of fields Plant, Location, Cost to be fetched from FUND-1 and autopopulated in the customfields of the Capex Commissioning Project Issue.

How do I achieve this?

1 answer

0 votes
Florian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 5, 2020

I think Automation for Jira can do the job.

You can build an automation rule that is triggers by the creation of the link and fetch the data. 

Another approach is to create the second task by a manual trigger. The automation rule can then create the new task, copy all your fields and set the link by just one mouse click.

Automation for Jira can be found in the marketplace. It requires little programming skills. But even with no programming experience at all it’s possible to learn how it works within a couple of days. 

Pranita Warik September 10, 2020

HI @Florian 

We do not have the Automation for JIRA Plugin as of now. Can we do something with the ScriptRunner, JMCF Plugin and JSU Automation Suite.

Florian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 11, 2020

Hi

I don’t think JSU is able to do it (80% confidence).  ScriptRunner should do the job as my understanding is that this plug-in allows you to do almost everything the API provides. I have no experience with ScriptRunner but I think is one of the most powerful plug-ins for users with programming skills. 

When you google for “jira scriptrunner copy field value” you will find some examples. 

David Fischer
Community Champion
September 11, 2020

Hi @Pranita Warik ,

the problem is that you want to copy the field values whenever the issue picker value changes. If that only happens during a transition (or issue creation) then you can use post-functions (JMWE, ScriptRunner, etc.) to copy the fields from the issue pointed to by the issue picker to the fields of the current issue (being transitioned or created).

However, this won't work when the user changes the issue picker value directly on the issue screen.

For that, you'd need a ScriptRunner listener to "listen" for changes to the issue picker field and copy the fields then.

Another approach, instead of copying the field values from one issue to another, is to display the values from the FUND issue on the commissioning issue. You could do that with JMCF calculated fields, but then the fields on the commissioning issue would be read-only (which might actually be what you want - the other approaches will copy fields from the FUND issue to the commissioning issue but nothing will then prevent users from manually changing these fields on the commissioning issue).

Suggest an answer

Log in or Sign up to answer