How can i realize a field that counts to zero?

Hello, 

i want to create a custom field "Mean Time To Failure". Starting with 10000 hours. After 10000 hours i want it to be to 0. I want to get an E-Mail after that.

 

How can i realise that with ScriptRunner?

 

Thanks

1 answer

0 votes

Hi Johannes.

I don't think that is entirely impossible, but I don't think this is a good idea.

Option 1:

What you could do would be to add a hidden field with your desired date. And then add a scripted field that takes that date into the timestamp, and takes it to 0 slowly. However that would not work:

The thing with scripted fields, is that they are evaluated when the issue is viewed. Which is obviously a problem, because you would need to view an issue to trigger an event...

So you need to do one of these two things:

Create a scripted job to re-evaluate that field. Which is a bad idea. Or:

Option 2:

Remove the second scripted field, and create a scripted job that calculates the time to failure a time of low load. That scripted field would basically take that date+10000 hours, and if any of the issues do step over that time, then send an email with each issue name.

---

The second choice would be my recommendation. Might be a bit difficult. Also, this isn't quite what JIRA is for, might not be worth the effort.

Cheers!

DYelamos

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,991 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