How to get Archiveversion from jira api java classes?

Hi all,

If the issue regarding archive.Then should not allow transistion.

validator plugin?

how to get the issue archived or not from issue?



1 answer

From the issue... eg if you were using a groovy validator the condition would be:


For java just iterate the getFixVersions() and call .isArchived().

suppose issue contians fixversion version v01.

If i did archived on version v01.Now the list is

empty even through the issue contains FixVarsion as value v01.

Collection<Version> cOlversions = issue.getFixVersions();
for (int i = 0; i < cOlversions.size(); i++) {
Version version = (Version);
			bArchive = version.isArchived();

What i do: If the issue contains archived version i don't allow to transistion.

In the code i am getting only released and Un released versions.I am not getting Archive versions of issue details.

Yes Jamie it filtering archived once.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

468 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you