症状

After creating Service Desk for existing projects, old issues created before the Service Desk creation date were not converted to Service Desk requests.

原因

Current JIRA Service Desk doesn't convert the existing issues to requests automatically. The improvement ticket is tracked over here:  JSD-55 - Getting issue details... STATUS

回避策

The following workaround was suggested by Andreyev Dias de Melo.

Please backup your database in advance or perform the following steps in Staging server before applying changes to the Production server.

  1. Install JIRA Suite Utilities.

  2. Go to the workflow used by the affected project.

  3. Create a temporary transition named "Set Customer Request Type" and map to the same status (or any other status you prefer).

  4. In the transition, go to the Post Function tab.

  5. Add a post function Update Custom Field with following values:

    project-key/request-type

     The values is formed with project-key/request-type(eg. test/hardware-request) in lowercase. To know which key and request type, you can run the following SQL in JIRA database:

    select vp."KEY" as "project-key",vpf."KEY" AS "request-type" from "AO_54307E_VIEWPORT" vp join "AO_54307E_VIEWPORTFORM" vpf on vpf."VIEWPORT_ID" = vp."ID";
  6. Save the workflow or publish the draft.
  7. Run the following JQL in Advanced Search:

    JQL
    project = XXXX AND "Customer Request Type" is EMPTY

    (info) Replace XXX with your prefer project. For better result, include the issuetype to ensure the issues set to the right request type.

  8. In Issue Navigator, choose Tools >> Bulk Operation.

  9. From the list of operations, select "Transition Issues".

  10. Select the transition "Set Customer Request Type"

  11. Finish the operation.
  12. The temporary transition can be removed from the workflow after the operation is completed.
Help us improve!

4 Comments

  1. user-626bc

    Screenshots and/or more detailed documentation would be very helpful.

     

    Additionally what steps are needed to keep this in place so new issues created via JIRA show up in the portal?

    1. user-626bc, I think if you keep the Transition in place you can create issues in JIRA and then get them to show up in the portal. I just did the above process and now I have a button when editing an issue, "Set Customer Request Type". When I create a new issue in JIRA, it doesn't set the request type until I click this button, which then makes it visible in the portal.

       

       

  2. As a public archive, I had to change the query as below for my Microsoft SQL server

    SELECT vp.[KEY] as "project-key", vpf.[KEY] AS "request-type"

      FROM [database].[jiraschema].[AO_54307E_VIEWPORT] as vp

      join [database].[jiraschema].[AO_54307E_VIEWPORTFORM] as vpf on vp.ID = vpf.VIEWPORT_ID

     

  3. After doing so, I can now see the issue in the Service Desk Customer Portal, but without any issue details, none of my fields are showing. That's a bit odd, is there any steps to make the issue details visible as well?