Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-30099

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

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? 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:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: