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

Add JQL function to allow the comparison of user fields to each other

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • JQL
    • None
    • 1
    • 2
    • 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.

      Problem Definition

      It would be helpful with JQL to be able to search for issues by comparing user fields to other user fields (e.g. where Assignee == Reporter or where Reporter == Requested Participants (on service desk))

      Suggested Solution

      Currently this is not possible to do with JQL, as you cannot compare user fields against other user fields. All user field can be compared with is a text value. As for functions, only CurrentUser() and memberOf() functions can be used for this, neither of which can make these kinds of comparisons.

      Why this is important

      This can be very useful from a JIRA admin point of view in order to be able to find issues that meet certain user criteria. For example, when the assignee is also the reporter, or when one of the user fields matches a user in a custom user field. This kind of comparison should be relatively easy to implement within JQL and in turn could extend the functionality significantly.

      Workaround

      This is something that can be done with Scriptrunner. Only then can you gain access to other JQL functions such as

      issuefunction in expression("project = FOO", "assignee != reporter") 
      

      Examples of users on Atlassian Answers looking for this functionality:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aheinzer Andy Heinzer
              Votes:
              25 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: