Flagged history for reporting

This question is in reference to Atlassian Documentation: Flagging an issue

We need to use the Flag function to mark issues that have Impediments. However, we also need a way to report which issues were flagged at one time once the flag is removed.


Any suggestions?

We created a Calculated Number field to try and make a formula to give us a "1" every time the issue is flagged. We also need it to add to 1 each time the same issue is flagged. Here is the code but it doesn't work:

<!-- @@Formula:
Object flag = issue.get("customfield_10130"); int number = ((flag != null ? Integer.parseInt(flag.toString()) : 0 )
if( flag != null ) {number = ((flag != null ? Integer.parseInt(flag.toString()) : 0 ) 1) + flag;
return number;

1 answer

1 accepted

Hi Josh,

Could I check where you will be storing the flagged value as you have tagged lots of different plugins above.

However if you want to use Script Runner then you could create a Script Field which returns a number return type to show when an issue is flagged using the example code below.

// Get the Values of the Flagged Field
def flag = getCustomFieldValue("Flagged")

// Return 1 if the Flagged field is set and not null else return 0
if (flag) {
    return 1;
    return 0;

As for detecting if the issue was previously flagged then you would want to look at using some code similar to the example here to check the issue change history.

I hope this helps



Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,852 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot