Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Action to comment objects

Sebastian Hoehne (alt) March 2, 2023

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!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2023

Hi @Sebastian Hoehne (alt) 

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

Brock Jolet February 8, 2024

@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.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events