"Assign To" doesn't find users when creating a ticket, but does when editing

Issue #259 open
Gregory Warnes - Huntersville created an issue

I’m using custom Jira and Bitbucket servers.

When I create a ticket, none of the users are available in the ‘Assign To’ field, even through they are available when editing a ticket.

Comments (13)

  1. Gregory Warnes - Huntersville reporter

    This also happens with PR’s: When creating, no users are available for ‘Reviewers', but they are visible on ‘Edit’.

  2. dw

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} We’re experiencing the same issue with our Jira Server connection. I can choose assignees when editing an issue, but not when creating one.

    cURL logging says /user/assignable/search?issueKey=null&username=dw is called which only works for existing issues.
    It should be calling /user/assignable/search?project=KEY&username=dw instead when creating new issues.

    As a random side note, the official Jira Server mobile app seems to be experiencing the same or similar issue.

  3. Matthew Brown

    The error that is logged to the console while typing is

    undefined Error: error posting comment: Error: Request failed with status code 404
    at ba.<anonymous> (c:\Users\user.vscode\extensions\atlassian.atlascode-2.3.2\build\extension\extension.js:1:4080161)
    at Generator.throw (<anonymous>)
    at s (c:\Users\user.vscode\extensions\atlassian.atlascode-2.3.2\build\extension\extension.js:1:4078035)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:89:5) (at Function.error (c:\Users\user.vscode\extensions\atlassian.atlascode-2.3.2\build\extension\extension.js:1:3869722))

  4. Jonathan Doklovic Account Deactivated

    @Matthew Brown That’s interesting, When you say that happens when typing, do you mean typing in the assignee field on the create issue screen?

  5. dw

    @{557057:3695b794-cde3-43a2-99aa-c0fc6151b754} The 404 not found appears as soon as you start typing in the assignee field when creating a new issue, yes (when it tries to get the auto complete values).

  6. Jonathan Doklovic Account Deactivated

    Ok, Jira strikes again!

    Essentially, we use data returned from Jira to dynamically create the UIs for creating and editing issues which contains the URLs for autocomplete on each field.

    In the case of edit, the url is fine and contains all of the data, however, in the case of creating, the URL returned by Jira is busted.

    So the good news is, I’ve identified the issue. Now we just have to figure out a good way to work around it in our extension. It might take a bit, but we’ll definitely get this fixed.

    In case you’re curious, here’s the payload returned from our test server instance for the assignee field:

    "assignee": {
      "required": false,
      "schema": {
        "type": "user",
        "system": "assignee"
      },
      "name": "Assignee",
      "fieldId": "assignee",
      "autoCompleteUrl": "https://<our test domain>/rest/api/latest/user/assignable/search?issueKey=null&username=",
      "hasDefaultValue": false,
      "operations": [
        "set"
      ]
    },
    

    you can see on line 8, the url has issueKey=null which is incorrect since we don’t have an issue key yet. Jira should be replacing that with project=<the selected project key> since it does indeed know the project key.

  7. dw

    I mentioned above that the same behavior (error) exists on the official Jira Server Android app.

    Is this something that needs to be fixed on the Jira Server side to work for both VS Code and app?

  8. Jonathan Doklovic Account Deactivated

    I’m assuming the mobile app is doing the same thing as createmeta is the “source of truth” for field UIs.
    It probably needs fixed on the Jira side to make the mobile app work.

  9. Log in to comment