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

0 vote

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

358 views 0 6
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