Overdue items error in Sharepoint 2007 budgeting and tracking multiple projects template

Caution: Humblebrag below!

Project dashboard error in Sharepoint 2007 budget and project tracking module.  The overdue tasks are coded incorrectly in the web part.

There wasn’t any overdue tasks in the Overdue Items list, but when you looked on the dashboard the projects were critical and showing overdue tasks.

Bad Microsoft!!!  Bad!

I went into the web part editor (XSL code) and I found innapropriate logic!

(substring-before(@DueDate,’-‘) < substring-before(ddwrt:TodayIso(),’-‘)
or
substring(@DueDate,6,2) < substring(ddwrt:TodayIso(),6,2)
or
substring(@DueDate,9,2) < substring(ddwrt:TodayIso(),9,2))]) < 5″>

This logic divides the DateTime (e.g.: “2012-6-27T12:00:000”) into Year (2012), Month (6) and Day (27)

then it compares with today’s Year, Month and Day separately.

Which means if either condition is true, the task is overdue.

Bad Microsoft.

Here is how I fixed it:

Replace all instances of the following code:

(substring-before(@DueDate,’-‘) < substring-before(ddwrt:TodayIso(),’-‘)
                                                   or
                                                   substring(@DueDate,6,2) < substring(ddwrt:TodayIso(),6,2)
                                                   or
                                                   substring(@DueDate,9,2) < substring(ddwrt:TodayIso(),9,2))]

with

number(translate(substring-before(@DueDate,’T’), ‘-‘, ”)) < number(translate(substring-before(ddwrt:TodayIso(), ‘T’), ‘-‘, ”))]

I have to finish by saying that it feels really good to fix Microsoft code!  Hope this helps

He must increase, but I must decrease. – John 3:30

He must increase, but I must decrease. – John 3:30 (NKJV)

This scripture seems simple, right?  Well it is until you compare it with other versions (e.g., NIV, NLT).  In each of those versions they omit the ‘but’!  So I ask you, is ‘but’ that important?  Well, let’s look a little deeper.

First I ask you what must increase? Conversely, what must decrease?

I am of the flesh. A product of this world and as such I am filled with some really good things, but I am also filled with some undesirables.  Jesus indeed was a product of this world, but he possessed the holy spirit.  Why was Jesus so full of the holy spirit? Well, because he was not full of the worldly things, he was set apart; blameless and without defects.

So what must we increase?  The spirit (the holy ghost).. Faith.

So what must we decrease?  Our worldly ways (carnal nature).

Seems simple enough, right?  Well, if you read the New International Version (NIV), and I do on a daily basis.  You might miss the little word in the middle of the verse.  That little ‘but’!

What does that little ‘but’ do?  It adds a condition!  It declares that one happens first in order for the second to happen.  It places two verbs in some sort of a sequence, and this sequence is eternally important!

So, which comes first?  (if you just said chicken you and I are very similar).  Seriously though this simple ‘but’ tells us what the condition is, and therefore tells us which must come first.

We must decrease in the worldly ways, before we can increase in the spirit.  Now this may not be revolutionary to you, but for me; it changes everything!

For the past 10 years, I have been under the misunderstanding that if I continue to learn about Jesus and read the bible over and over that I will get there.  This entire time I was unwilling to put away or even say that my life was in need of change.

I have hit my threshold with the spirit, I can’t gain any more unless I am willing to put my sin behind me.  No matter how much I toil and ask God for favor and knowledge it is of no use….  I must decrease before God can increase.

Thanks to God for the understanding.  Thanks to you (my friend) for reading this, and now I ask you to pray for me.

Pray for decrease 😉