I am trying to make use of the Jira Automation feature to append comments made on Epics to a Confluence page that my team wants to use as overview of the relevant notes made by other colleagues on this work items, so far I have made the automation work and every time a new comment is logged on an Epic the automation appends successfully the URL, Key, CommentTimestamp, CommentAuthorName and CommentBody. The problem is that the values returned in CommentTimestamp, CommentAuthorName and CommentBody contain ALL comments logged in the Epic not just the LAST ONE which is what I am after, in other tools I could imagine something like parsing the response (because I see is comma separated) and only write the last value of that list, BUT have no idea how to achieve that in the Jira Automation tool, anyone has experienced anything similar OR knows how to go about this. Thank you!
Hi @Jose Quispe -- Welcome to the Atlassian Community!
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
If the trigger for your rule is the adding of comments to the work item, you could reference the last comment only from the list of comments to add it:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.last
Kind regards,
Bill
@Bill Sheboy thank you that documentation helped a lot! are you aware of any kind of "trigger" that would take the system date and based on a day of the week allow to perform an action?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand your question, the Scheduled Trigger would work:
https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Scheduled
When using a different trigger and you want to compare the current date to a specific day of week, the date / time functions will help:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I seem to be having another issue with regards to how the automation posts the messages on Confluence, the URL of the tickets appears as I want them to but the details I extract from each update now appear blocked and have a tag "Unlicensed user", any ideas what this could be?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To provide context for what you describe, please post an image of your rule action to update the Confluence page. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy here an image of the automation, the trigger is any comment posted on the Epics of the project in JIRA, thanks in advance for any guidance you can provide
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that image, @Jose Quispe
Your rule is adding {{issue.comments.last.author.displayName}} to the page, and the resulting content indicates they are not a Confluence user. Does the page access allow unlicensed users to post comments?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the reply! in theory all users in our team have access to Confluence, and in theory the space and page, but for some reason this particular attribute only gets rendered for Admins, what puzzles me is that even if I remove that property the comment is also not being sent to the page, any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is curious...two more things to try:
#1) Because the trigger is for adding a comment, there is an additional smart value: the singular one {{comment}} for the comment added which triggered the rule. And so rather than using {{issue.comments.last}} use just {{comment.created}}, {{comment.author.displayName}}, etc. This may help isolate the cause.
#2) This could also be a timing problem in the rule. Specifically, some data cannot be looked up fast enough for a rule action to use. This may be checked by using the Create Variable action:
{{issue.comments.last.created}} - {{issue.comments.last.author.displayName}} - {{issue.comments.last.body}}
{{issue.url}}
{{varCommentInfo}}
What this does is fully evaluate the information needed from the comment first, storing that as plain text in a variable. When the variable is used later in the action, no additional handling is needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.