SIL Script and Interval custom fields

Casey Schmit December 26, 2012

The interval custom fields work great for trying to track some additional estimates and work done on a particular item(yes, I'm trying to avoid sub-tasks). I'm also trying to use a SIL script to calculate work left(Estimate - Work Done). When doing so, it's treating the interval value as a 24 hour intervals(instead of 8 hours a work day). Even just returning the custom field value in the SIL script shows this.

1 day in the interval field shows as 8 hours in the SIL field.

2 days in the interval field shows as 16 hours in the SIL field.

3 days in the interval field shows as 1 day in the SIL field.

Is there something I can do in my script to make sure these show up correctly(3 days shows as 3 days)?

Thanks,

Casey

2 answers

1 accepted

1 vote
Answer accepted
Radu Dumitriu
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.
December 26, 2012

Hi Casey,

Internal and external representation of a value are different things. You are substracting est - wd, but you are showing it in a 'non-interpretative' field (kcf). I'm on holiday (so I do not have something to test on) but you should multiply the value acordingly.

I will add an improvement to create a routine to format intervals; we'll take care of it in January.

0 votes
Casey Schmit December 26, 2012

Thanks Radu. That makes sense.

It's not limited to the result of the est - wd, but even if I just output the value contained in the custom field directly. So if I enter 3d as the estimate, it shows as 1d in the 'non-interpretative' field.

A simple multiplier doesn't seem to be sufficient. I can make the day cases work correctly with a multipler of 3(est matches 'ni' field), but then this breaks the hour cases. And then that doesn't carry across to the weeks either(2w becomes 1w 3d, which is the correct number of days, just not counting weekends and the like). Is there a raw value I could access and use?

It's easy enough to work around by not using an interval field and just tracking it as a number of hours... Then I can easily use the calculated field.

I'll try whatever you come up with. Enjoy the rest of your holiday!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events