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

How to convert interval to millis in SIL

I just need to provide the results in weeks only, so it is the opposite of millisToInterval(millis).

I need IntervalToMillis :)

3 answers

1 accepted

0 votes
Answer accepted

Hi,

I have answered here, http://bugs.kepler-rominfo.com/browse/KCF-18, I will write it here too:

You can get the interval as milliseconds by casting an interval to a number, like this:

interval i = "2h";

number n = (number)i; // holds 7.200.000

Usually, you will divide this number to 1000 * 3600 * 8 * 5 to get the number of weeks. Assuming 5 days / week, 8 h / day. We also have a round routine to pretty print the number, if necessary: http://confluence.kepler-rominfo.com/display/JJUP20/round. The rest is up to you, you are free to do whatever you want with the number of weeks :)

Best Regards,

Silviu

Silviu, thanks! It works and I was able to get the week on the field n.

The problem I am having now is that JIRA is not interpreting the results as "number" so it is not ordering the column in descending order or grouping issues when I want to use the two dimensional gadget.

Do I need to convert n to any other format to be able to do that? I rounded the results to 0 so I can see just the Weeks.... but the whole purpose of this was to group all the issues by the number of weeks.

Two dimenssional gadget interprets the result as None and pie chart as 0.0, so I am assuming that the issue is with the format ??

Thanks!

reindexing now to see if this fix the issue. Per Radu, Indexing is very important. If you want it number, you should select the correct indexer.http://confluence.kepler-rominfo.com/display/KCF/SIL+Script+Custom+Field

I am hopping to get a number as result and then convert it to Weeks

I want to show the remaining estimate and original estimate in hours only. How do I do that?

Check my answer, you will have to divide by 1000 * 3600.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

We want to hear from you! How do you use Slack and Atlassian together?

Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...

22 views 0 2
Join discussion

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