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

Copying the comment on flagged to a custom field

Sandra Vaesen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2022

I want to do the following.

Copy the 'comment' when 'flagging' an issue to a custom field 'Flagged reason'.

I want to do this via automation rules.

Can someone help me with the sample code if this is possible at all?

 

2 answers

1 accepted

0 votes
Answer accepted
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 9, 2022

Hi @Sandra Vaesen , welcome on the community, can you describe the process better? What does 'flagging' mean? What type of project do you use? Do you 'flag' the issue on transition screen which contains 'flag' custom field and 'comment' field?

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.
July 10, 2022

Hi @Sandra Vaesen -- Welcome to the Atlassian Community!

First thing, a couple of questions:

  • What problem are you trying to solve by copying the comment?  i.e. is this for reporting?
  • What do you want to do when the flag is removed? e.g. clear the field, store the comment added when clearing the flag, something else?

Next, how to do this:

This could be done with one of the marketplace scripting addons, or you could use the built-in features of an automation rule.  For example:

  • trigger: issue field changed for "flagged"
  • action: edit your custom field, adding the last comment added with {{issue.comment.last.body}}

You could also trigger on Issue Commented, and check with conditions if the comment contains either (flagoff) or (flag)

To learn more about automation rules, please look at these example rules and how-tos:

Kind regards,
Bill

Sandra Vaesen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2022

Hi, this is just what I needed (the {{issue.comment.last.body}} )

Many thx!

Like • Bill Sheboy likes this
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2022

Hi @Sandra Vaesen , can you please accept the Bill's answer instead of mine? :) thank you

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events