Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to copy fixVersion from one ticket to another using plugin?

Eva
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.
February 21, 2012

So i have a post-function plugin that pretty much synchronize fields from one ticket to another. The problem I have is copying the latest fixVersion from ticketA to ticketB.

I read the post on SO, and I kinda follow his code but that doesnt work for me. No matter what I do, the fixVErsion remains unchanged.

My code is below. Let me konw if anyone knows how to fix this!

ImportUtils.setIndexIssues(true);
MutableIssue issueToBe = issueManager.getIssueObject(internalIssue.getId());		
issueToBe.setFixVersions(prodIssue.getFixVersions());
issueToBe.store();
ImportUtils.setIndexIssues(false);

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Jobin Kuruvilla [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.
February 21, 2012
Eva
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.
February 21, 2012

Hmm, i will try later tonight. But it doesnt make sense that it works for other "Jira fields" like description, but not fixversion.

Jobin Kuruvilla [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.
February 21, 2012

Actually, it does. Description is stored in the jiraissue table itself but fixversion, components etc are stored in different tables and has relation to the jiraissue table. In the above case, you are only storing the jira issue which is not enough.

IssueService on the other hand will do everything behind the scenes for you.

TAGS
AUG Leaders

Atlassian Community Events