hello all,
I have a jira issue linked to a jiraservicedesk issue, and when I add a comment to the jira issue it has to replicate to the servicedesk issue.
I have made an integration with scriptrunner and I get the comments to be synchronized in both directions, but I see how to mark the comments in servicedesk as private
this making the call
url.../rest/api/3/issue/{idissue}/comment
Json
{"body":{"version": 1, "type": "doc", "content": [
{"type": "paragraph","content": [ {"type": "text", "text": "Hola usuario finalbbbbbb, "} ]},
{"type": "paragraph","content": [ {"type": "text", "text": "no te menciono"} , {"type": "text", "text": " "}, {"type": "text", "text": "Gracias"} ]}
]},
"jsdPublic": false
}
passing jsdPublic to false should make the comment private, but it doesn't.
Any idea how I could do it.
thanks in avance
If the comment you're creating is on a JSM request, you should use the Jira Service Desk API to create the comment.
The JSD API has the option to create public or private comments as seen on the documentation
POST /rest/servicedeskapi/request/{issueIdOrKey}/comment
I hope this helps you.
Kind regards,
Renzo from Servicerocket
Hi Renzo
thank you very much for the comment.
The problem I have with the call that you indicate is that I cannot send the comment to JSM with more than one line in the Body, it does not send if references to the user "@santiago" are added.
The problem I have with the call that you indicate is that I cannot send the comment to JSM with more than one line in the Body, it does not send if references to the user "@santiago" are added.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to reference users in JSM you need to use markup and not direct tags as in Jira Software.
Here's an example "Hi [~accountid:123456789123456ddfe814] ..."
The only thing is that you would need the account id of the user you're trying to reference. (replace 123456789123456ddfe814 with your user id)
Just a question though. Have you tried using an Automation rule? For what you're trying to do it looks like a better option in my opinion. I'm missing some context nonetheless so it may not work for your use case.
Kind regards,
Renzo from Servicerocket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
thank you very much for the comment
I am using scriptrunner (script listener), I have been able to send the mentions to the users, I still need to be able to add the line breaks.
I am adding "\n" but it gives an error in the call.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much, I have found the solution, instead of sending /n , I have sent the literal "\\\\n" in the post and with that it generates the line break.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.