Request type synchronization not working

Originally asked by Destri Weir on 24 February 2022 (original question)


I’m working on an issue with internal vs. external comments, but in order to implement that logic I need the Request type column to sync between Jira Service Desk and Jira Software. I’m using the exact logic explained here: https://docs.idalko.com/exalate/display/ED/Setting+the+request+type+using+the+visual+editor

I’m using script with a visual editor, the request type is populated on the Service Desk issue, but it will not sync to the Jira software issue.

We have to have comments sync between the two projects, but we want to enable the customer portal, and we don’t want them to see see the comments from the Jira software project.

Current script is this:

if (firstSync) {
TMSServiceDesk.issue.customFields.“Request Type”.value = TMS.issue.customFields.“Request Type”?.value
}

But I tried setting a Fixed value, too, and that did not work. I’m not getting an error, but the Request type field on the software side is not getting populated.


Answer by Sim Hua Soon on 03 March 2022

The Request Type custom field is a special field for Service Desk project.

I don’t think it is possible to edit the Request Type field in the Software project.

Can you try to edit the issue in the Software project to see if you can edit the Request Type field?


Comments:

Destri Weir commented on 03 March 2022

I can’t edit it in the Software project, but I also can’t send the value to the software project. I do have it populated in the Service Desk project and I can edit it there. But, it was my understanding that request type needed to be populated on the software project so that comments synchronized from the software project are synched to Service Desk as internal comments (and then won’t appear in the customer portal).

Sim Hua Soon commented on 04 March 2022

I think you can set the synched comments as internal using something like this.

issue.comments = commentHelper.mergeComments(issue, replica, {
  // make the comment internal, if the comment is visible only to the user role "team"
  comment ->
    comment.internal = comment.roleLevel == "team"
  // collect the comments
  comment
}

You can check out

Destri Weir commented on 11 March 2022

It was a silly syntax error on my part, but thank you for the documentation links!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.