症状
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-55Getting 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.
Install JIRA Suite Utilities.
Go to the workflow used by the affected project.
Create a temporary transition named "Set Customer Request Type" and map to the same status (or any other status you prefer).
In the transition, go to the Post Function tab.
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";
- Save the workflow or publish the draft.
Run the following JQL in Advanced Search:
JQLproject = XXXX AND "Customer Request Type" is EMPTY
Replace XXX with your prefer project. For better result, include the issuetype to ensure the issues set to the right request type.
In Issue Navigator, choose
Tools >> Bulk Operation
.From the list of operations, select "Transition Issues".
Select the transition "Set Customer Request Type"
- Finish the operation.
- The temporary transition can be removed from the workflow after the operation is completed.
4 Comments
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?
Dave Truman
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.
Alexandre H
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
Ruiza Cruz
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?