SiT! Bugs - SiT!
View Issue Details
0000998SiT!incidentspublic2009-10-24 19:342010-03-27 12:30
3.60 LTS3.60 LTS 
0000998: review due wrong
If the review is due is showen in the last column the figures are usually wrong/misleading

I've got one which says

Review Due > 505 working days ago!

This incident was opened on the 4th Oct 2008 so is only 1 year 19 days old so how can its review have been due over 505 days ago?
No tags attached.
png reviewdue.png (208,922) 2010-03-14 16:43
Issue History
2009-10-24 19:34paulhNew Issue
2009-10-25 11:11ivanNote Added: 0002134
2009-10-25 11:11ivanStatusnew => feedback
2009-10-25 11:18paulhNote Added: 0002135
2009-12-24 12:53paulhStatusfeedback => new
2010-02-20 19:52ivanStatusnew => confirmed
2010-02-20 19:52ivanTarget Version => 3.60 LTS
2010-03-13 17:01paulhNote Added: 0002674
2010-03-13 21:31ivanNote Added: 0002676
2010-03-14 15:04ivanStatusconfirmed => assigned
2010-03-14 15:04ivanAssigned To => ivan
2010-03-14 15:30ivanNote Added: 0002684
2010-03-14 15:30ivanStatusassigned => resolved
2010-03-14 15:30ivanFixed in Version => Current SVN
2010-03-14 15:30ivanResolutionopen => fixed
2010-03-14 16:29paulhNote Added: 0002687
2010-03-14 16:29paulhStatusresolved => feedback
2010-03-14 16:29paulhResolutionfixed => reopened
2010-03-14 16:37ivanStatusfeedback => assigned
2010-03-14 16:37ivanNote Added: 0002688
2010-03-14 16:43paulhFile Added: reviewdue.png
2010-03-14 16:45paulhNote Added: 0002689
2010-03-20 16:55ivanNote Added: 0002753
2010-03-20 16:55ivanStatusassigned => resolved
2010-03-20 16:55ivanResolutionreopened => fixed
2010-03-20 17:43ivanTag Attached: needsporting
2010-03-23 21:29ivanNote Added: 0002844
2010-03-23 21:29ivanTag Detached: needsporting
2010-03-27 11:16ivanFixed in VersionCurrent SVN => 3.60 LTS
2010-03-27 12:30ivanStatusresolved => closed

2009-10-25 11:11   
Hi Paul, any chance you could email me a copy of your database?
2009-10-25 11:18   
Hi Ivan,

db in the post
2010-03-13 17:01   
Problem here seems to be because now(0 - lastreview is passed to format_workday_minutes which converts this into the friendly format though we're passing in a full 24hours per day so is out by at least 3x (we're also passing in weekends)

We need to run this through calculate_working_time() I think, but not convinced
2010-03-13 21:31   
Review due always worked on actual calendar days, not days worked, so I think calculate_working_time() would be wrong for this.
2010-03-14 15:30   
There were several issues with this, it looks like theres been some confusion in the past. Review Due is a special SLA target that uses actual days not working days. Things weren't helped by a very badly name function that calculated the time since the last review, I've renamed it.

Fixed in 3.x branch svn r6243

Fix ported to Git sit:master eb163ae
2010-03-14 16:29   

Unfortunately r6243 doesn't resolve this :-(

I have a call in my test system which was opened "Saturday 4th Oct 08 @ 5:38pm" (so 1 year 5 months and 8 days) though the incident table still tells me "Review Due > 747 working days ago!" which is over two years ago which is obviously wrong as the incident hasn't been open for that long.

I could be clutching at straws here though I suspect somewhere along the line real days are being converted into working days (so 1 day is becoming 3 days)

2010-03-14 16:37   
OK I'll take another look. Shouldn't be any more working days calculations involved, but maybe I missed one. Just to double check do you get the same on the incidents popup page? Coz it's more or less the same code but copied rather than re-used.
2010-03-14 16:45   

I do get "Review Due Now!" on the incident pop up, theres no doubt the incident is due a review as I've not touched in since last June. reviewdue.png shows what I can see in SiT
2010-03-20 16:55   
I've made some more changes in 3.x branch svn r6292 and it does again look fixed, I've used some more data to test this out and seems ok to me now.

Would appreciate some testing to confirm. thanks.
2010-03-23 21:29   
git a7e584a