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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Worklog automation fails upon deleting an issue

Hi folks,

I've set up an automation that sets the estimates to 0 when a worklog is created, updated and deleted.

The problem is that when an issue with logged work is deleted the rules fails and I keep getting failed notifications.

I have many automation rules set up, but none of them fail when deleting an issue.

Is there any way to stop this?

 

Here's the automation and the error:

Screen Shot 2021-01-15 at 6.50.11 PM.png

And here's the JSON I use to update the estimates:

{
"fields": {
"timetracking": {
"remainingEstimate": "0",
"originalEstimate": "{{issue.timetracking.originalEstimate}}"
}
} }

 

2 answers

2 accepted

0 votes
Answer accepted
Brant Schroeder Community Leader Jan 15, 2021

This problem is when you delete the issue it is also deleting the worklogs and there is no longer anything to update.  You will need to have a condition to make sure that the issue is not deleted before you run your edit issue field.

0 votes
Answer accepted

Hi @Krzysztof Kiser,

The behaviour you see seems perfectly logical to me. When you delete an issue, the associated worklogs are deleted as well. That last event then triggers this rule that tries to edit fields on an issue that no longer exists, which is obviously not possible.

Unless deleting issues is a very common practice, I would not worry too much about the error generated by the rule. I'd rather recommend to make sure issues don't get deleted, but rather get cancelled via your workflows. At least you won't lose those time spent metrics that way and Jira is perfectly capable to store many, many issues. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

750 views 12 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you