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

Copy comment to linked issue with toggle?

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2024

Hi Community!

In a Jira instance I'm working on there will often be linked issues. In some cases the comments from the "main" issue must be copied to all the linked issues.
This is easy to achieve with an automation rule.

However I don't always want to copy the comments to the linked issue. I need a way to decided per comment if it should be copied yes or no.

Ideally I'd have a 3rd button next to shared with customer and comment internally like copy comment in order to save the comment with the copy option.

I thought about using a custom comment property that can be processed by automation rules. That way the rule can know if the comment must be copied. But I have no idea how to set a a comment property via the UI. It can not be done by default so I'd need to have to achieve this with scriptrunner somehow.

I looked at script fragments but I do not see a fragment to add a checkbox or button on the comment section.

Any ideas?

1 answer

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2024

I think this gets into the most complex type of customizations made possible by scriptrunner... but it's possible.

You will need:

  • Custom REST endpoint (GET) to generate  a dialog for users to select comments
    • The endpoint will accept an issue key as a query parameter
    • It will fetch all the comments on the supplied issue
    • Build HTML for a Dialog2 that contains a form that will show all the comments (in read-only) with a checkbox for users to select
  • Custom Rest enpoint to trigger the copy of the selected comments to all the linked issues
  • A javascript file to include with the dialog that will call the second REST endpoint with a POST request containing all the selected comments from the form.
  • A Web Item fragment to call the first API to open the dialog based on the current issue

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events