Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-30099

JQL: Allow fuzzy matcher for versions (fixVersions, affectedVersions)

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      The tasks I have (actually via Rest API currently) in a project containing issues for version branches 1.x.x and 2.x.x:

      • Find all issues in the latest released version 1.x.x of project ABC
      • Find all bugs in versions 1.x.x which are unresolved (known issues filter)
      • Find all issues fixed in version 1.x.x

      As both branches are continuously released the version management in Jira resembles to this:

      • 2.0.3-SNAPSHOT (next 2.0 release)
      • 1.0.13-SNAPSHOT (next 1.0 release)
      • 2.0.2 (latest release)
      • 2.0.1
      • 1.0.12 (latest 1.0 release)
      • 1.0.11
      • 2.0.0
      • ...

      My only idea: JQL should support fuzzy matching for versions. Examples for the three examples above:

      • Find all issues in the latest released version 1.x.x of project ABC
        project=ABC
          AND fixVersion in latestReleasedVersion("ABC","~1.")
          AND resolution = Fixed
        

        I think it makes most sense here to extend the JQL function latestReleasedVersion. If the fuzzy operator should be part of the string I don't know. I think the assumption is totally valid that all strings specified here are for fuzzy matching so the prefix could be skipped. Unclear: How to extend latestReleasedVersion to find all released 1.0 versions across all projects? Perhaps: latestReleasedVersion("*","~1.")

      • Find all bugs in versions 1.x.x which are unresolved (known issues filter)
        project=ABC
          AND type=Bug
          AND (affectedVersion in releasedVersions("ABC","~1.")
            OR affectedVersion is empty)
          AND resolution = Unresolved
        
      • Find all issues fixed in version 1.x.x
        project=ABC
          AND fixVersion ~ "~1."
          AND fixVersion in releasedVersions("ABC")
          AND resolution = Fixed
        

        alternatively:

        project=ABC
          AND fixVersion in releasedVersions("ABC","~1.")
          AND resolution = Fixed
        

      As you can see most of the time (for my use cases) it is sufficient to extend the JQL functions releasedVersions() and latestReleasedVersion().

      If it is easier to implement a new JQL function than you could introduce: matchesVersion("ABC", "1.". So for example the last JQL query would look like this:

      project=ABC
        AND fixVersion in releasedVersion("ABC")
        AND fixVersion in matchesVersion("ABC", "1.x")
        ...
      

      But I think this approach will not work nicely for to find the latest released version.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              2f5ffb0094a7 Mark Michaelis
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: