Forums

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

set issue key as a value to custom field of new issue, in postfunction

Harish Kumar
February 7, 2020

Hi All,

 

I have 2 projects, I added a scripted post function which creates a new issue in project 2...,

Here i need to copy Issuekey of project 1 to Custom field Value of project 2. and also copy custom field X value of project 1 to Custom field Y .Can you guys help me on this.

Thanks

harish Kumar

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Joshua Yamdogo @ 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 Champions.
August 9, 2017

Hi Ewa,

Not sure if you have already figured out the answer to this question, but yes you can definitely use the field value as a condition. The condition could be something as simple as this for a regular text custom field:

cfValues['Some Custom Field'] == 'Some Value'

Or, you could have a condition that checks for project key, issue type name, and the value of the custom field:

issue.issueType.name == 'Bug' && issue.projectObject.key == 'XYZ' && cfValues['Some Custom Field'] == 'Some Value'
TAGS
AUG Leaders

Atlassian Community Events