Hello,
I would like to create a comment for an object/asset in an automation rule. Unfortunately I can't find a action to comment on objects (only edit/create). Is this possible?
If yes: can i mention a linked Jira issue in this comment? I want the URL of the linked issue to appear in the objects' comment. (e.g.: "Hello, the linked issue for this asset is [URL]")
Thanks a lot in advance!
First thing: I am not using Jira Service Management, and so my suggestion is based on the documentation and what I know about automation.
I do not see a built-in ability to add a comment to an object for rule actions, or any suggestions to add that ability in the public backlog.
You could try using a webrequest action to call the REST API function to add the comment.
Here is a how-to article for calling the REST API from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
And here is a reference to the REST API for handling comments in JSM: https://insight-javadoc.riada.io/insight-javadoc-8.6/insight-rest/#comment
Kind regards,
Bill
@Sebastian Hoehne (alt) I wasn't able to find the correct call for retrieving or adding comments on Assets Objects in the official documentation here: https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-get
But I was able to find this doc that references comments, though the format of the call seemed incorrect: https://docs.atlassian.com/assets/REST/10.4.4/#comment-getComments
Using those two as references, I could piece together two working calls for retrieving and adding comments on Assets Objects. I have no idea if these are deprecated since I can't find them in the official docs.
You should be able to use those in a web request node in Automation as @Bill Sheboy referenced. It is working for me.
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.