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?

Thanyou!!

Suresh

1 answer

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

issue.fixVersions*.archived.contains(true)

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) fixVersionIterator.next();
			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 Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

353 views 0 1
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