Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to aggregate comments weekly

Connie Leuderalbert May 7, 2021

Hello Folks,

I am looking to create a field in Jira to store comments on a weekly basis for reporting in Confluence. 

I have an automation which copies the last comment to a last comment field, so I can see that in the Jira macro in Confluence.  

Now I would like to make another field called weekly which contains all comments for the week, preferably starting with the comment WWxx.  Has anyone done this?  Would appreciate any help you can give.

Connie

1 answer

1 accepted

3 votes
Answer accepted
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.
May 7, 2021

Hi @Connie Leuderalbert 

What do you mean by "weekly": a floating week or a fixed calendar week?

If you mean a fixed calendar week, have you considered doing this with two automation rules:

  1. Scheduled trigger rule which clears your custom field holding current week's comments at the start of week
  2. Modify your existing rule (triggered on comment added) to concatenate newly added comments to the end of the custom field

Your displayed field in Confluence should then show the running comments for the week.

Best regards,

Bill

Connie Leuderalbert May 7, 2021

Yes, that sounds like exactly what I want to do.  But, I don't know how to make a trigger rule to clear the comments or concatenate new comments to the end of the current.

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.
May 7, 2021

For the first rule, you would use something like this:

  • Trigger: scheduled on your weekly cadence.  Use the CRON help listed in the rule to help you pick a value
  • Action: edit field to clear your custom field to empty

For your second rule, you probably have something like this, assuming you only captured the comment body.

  • Trigger: issue commented
  • Action: edit field to change your custom field to {{issue.comments.last.body}}

To add to the current, you just put your custom field first:

{{issue.myCustomField}}, {{issue.comments.last.body}}

 

If you wanted more information, such as when it was commented and who commented, you could use this:

{{issue.myCustomField}}, {{#issue.comment.last}}{{created}}:{{author.displayName}} {{body}}{{/}}

 

You can modify this to add any Confluence markup you want for special formatting, like showing things as a list.

Like Connie Leuderalbert likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events