[open-ils-commits] r14922 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 16 13:27:55 EST 2009
Author: miker
Date: 2009-11-16 13:27:51 -0500 (Mon, 16 Nov 2009)
New Revision: 14922
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
loop-ending comparison thinko in recent SpanSet changes
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-11-16 17:59:10 UTC (rev 14921)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-11-16 18:27:51 UTC (rev 14922)
@@ -271,6 +271,7 @@
return undef unless ($date && $ou);
+ # we're given a date and a direction, find any closures that contain the date
my $t = actor::org_unit::closed_date->table;
my $sql = <<" SQL";
SELECT *
@@ -286,6 +287,7 @@
my $target_date = $_dt_parser->parse_datetime( $date );
my ($begin, $end) = ($target_date, $target_date);
+ # create a spanset from the closures that contain the $date
my $closure_spanset = make_closure_spanset(
actor::org_unit::closed_date->db_Main->selectall_hashref( $sql, 'id', {}, $date, $ou )
);
@@ -340,11 +342,11 @@
}
}
- if ($begin eq $date && $end eq $date) {
- return undef;
- }
+ my $start = $begin->strftime('%FT%T%z');
+ my $stop = $end->strftime('%FT%T%z') };
- return { start => $begin->strftime('%FT%T%z'), end => $end->strftime('%FT%T%z') };
+ return undef if ($start eq $stop);
+ return { start => $start, end => $stop };
}
__PACKAGE__->register_method(
api_name => 'open-ils.storage.actor.org_unit.closed_date.overlap',
More information about the open-ils-commits
mailing list