Forums

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

How get time remaining in Jira, which should be original estimate minus now create..

shiva May 15, 2021

Hi Team,

I have a field called time remaining, that field should automatically updated based on original estimate time minus now create time... Can anyone help me out the script for this...

Regards

Shiva

2 answers

1 vote
Anastasiia Kozaruk _SaaSJet_
Contributor
May 19, 2021

Hi, @shiva dare to live

 

Your request needs some clarification or review, since the Created field it's always DATE (19/May/2021).

At the same time, Original estimate - time amount (2 weeks, 2 days, etc). So, it's hard to calculate exactly what you asked.

However, you might try to use Time in Status for Jira Cloud. It gives you a chance to create the Calculated field within Pivot table functionality.

Add-on itself has a Time in all statuses, and Total time from Created till now in Hours. You can create the Field which will do simple math: Original estimate minus Total spent.

image_2021_05_19T09_19_56_197Z.png

Also, it will reflect your calendar as well. Here is the simple example I've just completed.

Feel free to install it and try with your data or use our Demo instance 

 

Regards,

Anastasiia _SaaSJet_

shiva May 20, 2021

Thank you @Anastasiia Kozaruk _SaaSJet_

I can do based priority. Suppose I have custom date picker field Time Remaining and Priority field such as P1, P2, P3, respectively....So P1=5days, P2=10 and P3= 15. Based on selected priority it should be sla minus now created for only bug issue type.. If can help out with script, it would be so great full...

 

Thank & Regads,

Shiva

0 votes
Ismael Jimoh
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.
May 16, 2021

Hi @shiva 

The above can be achieved with add-ons as:

As to what you want I recommend the former since you could set the goal and it automatically counts down. For the later, you would need to be careful when to trigger it as it can be quite resource intensive as depending on how often you want to calculate this time, if you have a lot of these running JIRA could easily run out of resources.

The following aren’t the only options but these come to mind first based on your description.

Cheers!

Vikrant Yadav
Community Champion
May 16, 2021

@Ismael Jimoh  Is time tracking field works in this scenario?

Thanks

Ismael Jimoh
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.
May 16, 2021

@Vikrant Yadav  Time tracking would depend on estimating and time logged fields.

From my understanding of what he wanted, he wants something that automatically counts down similar to JSM SLA.

Potentially he could use other time tracking providers from the Atlassian marketplace to see if they offer the functionality he described.

The default time tracking is covered here: https://support.atlassian.com/jira-cloud-administration/docs/configure-time-tracking/  

cc: @shiva @you could read more in the above and explore the options.

Thanks for bringing this up again @Vikrant Yadav 

Like Vikrant Yadav likes this
Vikrant Yadav
Community Champion
May 16, 2021

@Ismael Jimoh  Thanks for clearing my doubt. 

I think for automation, he needs to create a Scripted Time Reamining Field.  

I feel difficult to create Date time scripted field. 

What is the best method to capture date and put in a scripted field ?

Do you have any documentation or example  which timestamp class?

 

Thanks

shiva May 17, 2021

Hi @Ismael Jimoh  with the help of script runner, can you help me with the script for the above scenario.

Thank You 

Regards, 

Shiva

Ismael Jimoh
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.
May 17, 2021

Hi @shiva 

Unfortunately, I do not have anything available.

You can see some examples here: https://docs.adaptavist.com/sr4jc/current/features/scripted-fields#id-.ScriptedFieldsvCurrent-currencyconversion which so hope can help you get started.

Once again note that this can be resource intensive and you’ll need to create a scripted field for this.

Cheers.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events