diff options
Diffstat (limited to 'rt/lib/RT/Tickets_Overlay.pm')
-rw-r--r-- | rt/lib/RT/Tickets_Overlay.pm | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm index 89d64c557..e3658fee6 100644 --- a/rt/lib/RT/Tickets_Overlay.pm +++ b/rt/lib/RT/Tickets_Overlay.pm @@ -539,11 +539,22 @@ sub _DateFieldLimit { # if we're specifying =, that means we want everything on a # particular single day. in the database, we need to check for > # and < the edges of that day. - - $date->SetToMidnight( Timezone => 'server' ); - my $daystart = $date->ISO; - $date->AddDay; - my $dayend = $date->ISO; + + my ($daystart, $dayend); + if ( lc($value) eq 'this month' ) { + # special case: > and < the edges of this month + $date->SetToNow; + $date->SetToStart('month'); + $daystart = $date->ISO; + $date->AddMonth; + $dayend = $date->ISO; + } + else { + $date->SetToMidnight( Timezone => 'server' ); + $daystart = $date->ISO; + $date->AddDay; + $dayend = $date->ISO; + } $sb->_OpenParen; |