Since Version 3.1

JQL Environment Functions

Environment Manager provides new functions you can use to write advanced JQL queries.

JQL is a powerful query language to perform search in JIRA. A good introduction to JQL can be found here : https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql



deployedVersions()

Return the versions that are deployed on existing environments.


Basic examples

-> will return all issues having a fixVersion deployed to an existing environment. Useful to know the list of bugs that can be verified on a live environment.

-> will return all issues having an “Affects Version/s:” deployed to an existing environment. Useful to know the list of bugs than can be reproduced on a live environment.


Advanced examples

-> will return all issues having a fixVersion deployed to a Staging or PreProd environment. Useful to know the list of bugs for a customer acceptance testing campaign ?

-> will return all issues having a fixVersion deployed to an eCommerce or ERP environment.

-> will return all issues having a fixVersion deployed to an eCommerce Staging or eCommerce Pre Production environment.


Examples using “status=…” expression

-> will return all issues having a fixVersion deployed to a Staging or PreProd environment that have an “Available” status. Useful to know the list of bugs that can be tested on an “working” environment !

-> will return all issues having a fixVersion deployed to a Staging or PreProd environment that have an “Unavailable” or unknown status. Useful to get a list of bugs that cannot be tested because of non working or unstable environments.


deployedAndPreviousVersions()

since Version 3.8

Same as deployedVersions() but returns also the versions with a lower version number comparing to the deployed ones.

Imagine that you have the version 3.3 deployed on Staging, deployedAndPreviousVersions() will also return the versions 3.2, 2.0, 3.0.2, 1.0, 0.3,… (if they exist). It enables you to easily get the list of issues that can be tested, reproduced,… on your various environments.

Version Naming Convention

Since version 3.10 you can use almost any kind of naming conventions to order your versions. You can also mix numeric with alphanumerics to number your versions.

It allows you also to compare bananas with apples ! comparing versions with prefix used by different applications can lead to strange results.

Version naming conventions examples

  • 1.2.3
  • 1.2.3.b454
  • eCommerce 1.2.3
  • eCommerce_1.2.3
  • eCommerce-1.2.3
  • eCommerce 1.2.3.b343

Ordering rules examples

  • 1.2 > 1.1
  • 1.20 > 1.2
  • 1.001 == 1.1
  • 1.2.3.b454 > 1.2.3.a999
  • 1.2.3.b454 > 1.2.3.b452
  • 1.2.3.b454 > 1.2.3
  • APP_A_MOBILE 1.2 > APP_B_ERP 1.3 (example of “bananas with apples” comparison)

N.B. You can use exactly the same syntax and subfunctions as the deployedVersions() function.

Version comparison and ordering algorithm

The algorithm to compare and order versions names is simply extracting all chunks of numbers found in the version name. Then it concatenate all found numbers from left to right. The resulted concatenated numerical value is then used for comparison.

This algorithm is very flexible and does not depends on usage of specific separators between chunk of numbers. The chunks of numbers found in the left of your version number will always take precedence over the next chunks of number on the right

For java readers, you will find below example of comparisons with different format of version names:

 

 


Examples

-> will return all issues having a fixVersion with a version number equal or lower to the version currently deployed to Staging environments.


unarchivedVersions()

since Version 3.11

Returns all unarchived versions. Nothing to do with environments or deployments but very useful to exclude archived versions from the deployedAndPreviousVersions() function.

Examples

will return all issues having a fixVersion with a version number equal or lower to the version currently deployed to Staging environments, but EXCLUDING the archived versions.