Forums

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

Compare release versions lexicographically instead of based on release dates

Ádám Zovits January 29, 2018

Hi!

Our product is released in different major versions, which are then supplemented with additional minor releases as patches arrive while development continues along with the next major release. So as a greatly simplified release timeline we might have something like this: 1.0, 1.1, 2.0, 1.2 where after the 2.0 version was released a patch was implemented for the 1.X branch.

Now, when we execute a JQL query to collect all fixed issues for the 1.2 patch release that includes clauses like "fixVersion <= 1.2 AND fixVersion >= 1.0", the results include 2.0 even though this does not logically belong there, only because of the release date falling inbetween the release dates of the two mentioned versions.

Is there maybe a solution or a workaround for this problem? The fixVersion field does not support text based operators like "~" and creating a list of all affected versions to use with an "in" operator would be very inconvenient.

1 answer

1 accepted

1 vote
Answer accepted
Tarun Sapra
Community Champion
January 29, 2018

Have you tried "fixVersion in versionMatch(<regex here>)"

Ádám Zovits January 29, 2018

This seems to work, even though creating a regex to match (for example) versions 3.4.5 - 3.7.23 is still quite inconvenient, but this is at least another viable route worth considering. I'd nonetheless still prefer a way to sort lexicographically, but thank you for this suggestion!

Tarun Sapra
Community Champion
January 29, 2018

Possible duplicate here - https://community.atlassian.com/t5/Answers-Developer-Questions/How-would-you-find-all-numerically-greater-Fix-Versions-WITHOUT/qaq-p/558897

And similar request here - https://jira.atlassian.com/browse/JRASERVER-61828

If your request has been addresses, please accept/upvote the answer. Thanks.

Ádám Zovits January 29, 2018

Thanks to your links I have found that the comparison operators do not work based on dates as I have initially thought, but basedon the ordering of the version numbers in the "Releases" view. Which was ordered according to release dates in our installation, since new versions were simply added to the top every time.

By manually reordering the versions to the lexicographic ordering (via drag-and-drop) the initial query with the two comparisons returned the expected results.

Tarun Sapra
Community Champion
January 29, 2018

Yes indeed, the ordering is based on the order in the release page of the fixVersions.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events