Issue picker REST API endpoint History Search not returning created tickets

XMLWordPrintable

    • 2
    • Minor

      Issue Summary

      Using the Get issue picker suggestions Jira Cloud REST API endpoint, the API is not returning issues created by the user without the user navigating to the issue itself.

      Endpoint:

      /rest/api/2/issue/picker

      Per the documentation the History Search should return:

      which includes issues from the user's history of created, edited, or viewed issues that contain the string in the query parameter.

      Based on the above description, if a user creates a ticket via say the Jira Issue view using the Create button, this endpoint should return the ticket without the user needing to view the issue.

      Steps to Reproduce

      1. Create a ticket via the Global Issue Create screen in the Jira user interface with a unique name such as quebec
      2. Do not visit the ticket but search for it using this API endpoint: https://example.atlassian.net/rest/api/2/issue/picker?currentProjectId=&showSubTaskParent=true&showSubTasks=true&currentIssueKey=&query=quebec
      3. The REST API does not return an issue using the History Search
      4. Visit the issue and re-run the search and the issue is found since the viewed aspect kicks in

      Expected Results

      The newly created ticket is returned using the History Search of the REST API endpoint without the need to visit the ticket.

      Actual Results

      The REST API does not return the issue.

      {"sections": [
          { "label": "History Search", 
             "id":"hs",
             "msg":"No matching issues found",
            "issuews":[]
         }
       ]
      }

      Workaround

      Using the Current Search which includes a JQL query can help retrieve those links. The above example can be altered to the following Current Search URL:

      https://example.atlassian.net/rest/api/2/issue/picker?currentIssueKey=&showSubTasks=true&showSubTaskParent=true&query=quebec&currentJQL=project%20in%20projectsWhereUserHasPermission(%22Link%20Issues%22)%20AND%20(resolution%20%3D%20Unresolved%20or%20statusCategory%20!%3D%20Done)%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC

            Assignee:
            Unassigned
            Reporter:
            Andras M.
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: