Auto Unflag on Schedule

Frank Pineiro July 26, 2024

Hello, 
Im very new to this automation. How can I setup automation to unflag a card in my project when the scheduled Date/Time hits? For example, the card is flagged and it has scheduled filled out for 7/5/2024 04:00, how can that card be auto unflagged?

Thanks!

1 answer

1 accepted

2 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.
July 26, 2024

Hi @Frank Pineiro -- Welcome to the Atlassian Community!

You could create a rule with a Scheduled Trigger, with JQL to identify the issues, and then use the Edit Issue action to clear the Flagged field.

However...how does your team use the "flag"?  That is, what does it represent?

From what you describe, automatically clearing the flag may not align to the problem the team is solving by using the flag.

 

To learn more about automation rules before trying to write one, please look here:

Kind regards,
Bill

Frank Pineiro July 26, 2024

Hey Bill,

Thank you for the quick response! Under that Project, we flag cards until the scheduled date/time. I will attempt what you suggested. 

Like # people like this
Julia Smith
Banned
July 27, 2024

I was facing the same issue, but I finally resolved it thanks to your treatment of the problem.

Frank Pineiro July 31, 2024

@Bill Sheboy  No dice. Pretty sure im doing something wrong.

Flag.jpg

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 31, 2024

If you mean the issue's Flagged field, isn't that the one you want to clear?

And so the scheduled trigger JQL could be:

project = "DC OPS Turnover" AND Flagged IS NOT EMPTY AND "Scheduled Date/Time" = startOfDay()

Then clear the Flagged field with the edit.

 

Frank Pineiro July 31, 2024

Im attempting a search with 

project = "DC OPS Turnover" AND Flagged is not EMPTY AND "Scheduled Date/Time" = startOfDay()

Nothing is populating. Im assuming startOfDay() is today? Once I remove "Scheduled Date/Time" = startOfDay(), I have results. I do have several items with yesterday, today and tomorrow dates.

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 31, 2024

The function startOfDay() is a date / time value, and if your field "Scheduled Date/Time" is also date / time, they are unlikely to match exactly.

Perhaps adjust to find values within "today" with this:

project = "DC OPS Turnover"
AND Flagged IS NOT EMPTY
AND "Scheduled Date/Time" >= startOfDay()
AND "Scheduled Date/Time" < endOfDay()

I recommend running that standalone first with View All Issues to confirm it returns what you wanted, and make adjustments.  Then try it with the rule.

Frank Pineiro August 1, 2024

That worked!
When running the rule, I see a status of Success but
the card is still flagged.

Under Labels --> Values to Remove
I selected everything related to Flag.
Unflag.jpg

Here is the test card Im using

Flagged.jpg

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.
August 1, 2024

The flag is a different field, named Flagged.  Please use that field in the edit action, leaving the value as empty to clear it.

Like Frank Pineiro likes this
Frank Pineiro August 2, 2024

Thank you Bill! All working now. Really appreciate the help! 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events