Been wrestling with how to know how many days an item has been in the current status. Well with the help of our community, I put together some ScriptRunner fields that seems to be doing the job for me.
Fist I created a Time of Last Status Change fields using Script Runner's Field feature. This is a provided feature. I called this field Status Change Date.
Then I created another field using the Custom Script Field. I took today's date minus the Last Status Change field (created above) and output it as a number.
Code in the Days Since Created field using the Custom Script field
def enddate = new Date() as Date
def startdate = issue.getCreated()
Integer daydelta = enddate - startdate
This community has been a great help to me and I hope this helps others
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