Forums

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

Due Date automation clearing value instead of updating/ignoring

Erica Robinson
Contributor
August 30, 2024

I currently have an automation set up on a JSM project that reviews inbound tickets for one of these comments:

  • New date to delete DB
  • Upgrade has been canceled
  • Upgrade has been cancelled

 

If individuals comment one of those three things, either the DueDate field is updated with the new value they provide or the assignee is notified that the request is canceled (two options based on spelling).

 

The issue I have right now is that when the due date comes through, the first time the automation runs, it works as expected and the due date is updated based on what the users comment. The second run-through it wipes out the due date and then the tickets fall off being followed up on. 

On the ones that have had their due dates wiped out, I confirmed that there aren't any comments that have "New date to delete DB: ", it's just the original comment with the originally requested new due date. I'm not sure why it's wiping out the due date value.

 

For ease of access, here's the due date value being used:

{{issue.comments.last.body.substringAfterLast("DB:").toDate("MM/dd/yyyy").format("yyyy-MM-dd")}}

Here's the automation I have currently: 

DuedatCancelationAutomation.png

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 30, 2024

Hello @Erica Robinson 

I see you have actions to add a comment to the issue noting the new due date. Are those comments getting added and do they show the correct value?

You should add validation to confirm that you successfully extracted something from the last comment. You can do that by adding a smart value Condition before your Edit action.

Screenshot 2024-08-30 at 2.52.57 PM.png

 

You have the rule running on a schedule, selecting only issues that have been updated since the last time the rule ran. And you are trying to pull the date from the "last" comment.

If a comment has been added to an issue, that will change the Updated date/time, and so the rule would select that issue. But if that last comment has nothing in it about the due date, then this rule would fail to get any information when it tried to extract such data from the comment. That would cause the Due date to be wiped out, since you don't currently have anything validating that you got a legitimate value from the last comment.

Erica Robinson
Contributor
September 3, 2024

Hey Trudy,

Thank you so much for the in-depth explanations and additional information.

I see you have actions to add a comment to the issue noting the new due date. Are those comments getting added and do they show the correct value?

Unfortunately anything past the first comment did not, here's an example: 

DueDate Drop.png

You should add validation to confirm that you successfully extracted something from the last comment. You can do that by adding a smart value Condition before your Edit action.

I've now added this in, thank you for pointing this piece out!

You have the rule running on a schedule, selecting only issues that have been updated since the last time the rule ran. And you are trying to pull the date from the "last" comment.

If a comment has been added to an issue, that will change the Updated date/time, and so the rule would select that issue. But if that last comment has nothing in it about the due date, then this rule would fail to get any information when it tried to extract such data from the comment. That would cause the Due date to be wiped out, since you don't currently have anything validating that you got a legitimate value from the last comment.

That makes a lot of sense with some of them where individuals emailed follow-up on top of the comment and it failed first instead of adding the due date. I'll work on providing more in-depth clarification for next steps to these teams since this is a new process for them. 

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events