Forums

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

Get value from custom field in one project and reflect in custom field in another project

Ray S May 17, 2019

I'm trying to take the value from a custom number field in project 'A' and pull that in to a custom number field in project 'B' on Jira sever. This is how we currently work: 

Project A > EPIC - total budget e.g. 4000

Project A > STORY - reflect the part of total budget (below)

Project B > CHANGE TICKET (in other project) - part of total budget e.g. 1500

The figure in project B should be the same, and updated when changed, to the custom field in project A Story. 

This calculation should only take place if the ticket in Project B is a linked issue of the story in project A

1 answer

0 votes
Nic Brough -Adaptavist-
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.
May 17, 2019

It should be a simple "get custom field value for X from issue Y", and then "expose it on to issue Z", which are things people do with Scriptrunner all the time.

https://library.adaptavist.com/entity/copy-field-value-from-linked-issue is probably a good starting point, although we don't know if a scripted field might be better or how you are choosing which issues to work with.

Ray S May 17, 2019

Hi @Nic Brough -Adaptavist- it says in the documentation that it should be installed as a workflow post function. Does this mean that it will only come in to effect once a transition has been made in the workflow and not if a change is made at any point in the linked ticket? 

Nic Brough -Adaptavist-
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.
May 17, 2019

Yes, that's what a post-function will do, run during a transition.

You did not tell us when you wanted this field update to happen, so we couldn't tell you a lot more.  However you want to do it, the code in the post-function is a good starting point.

Suggest an answer

Log in or Sign up to answer