better date range support for surveys
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Aug 2006 16:22:06 +0000 (16:22 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Aug 2006 16:22:06 +0000 (16:22 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5734 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index 69cdd93..35729a3 100644 (file)
@@ -250,7 +250,7 @@ sub find_local_surveys {
                SELECT  s.*
                  FROM  $s_table s
                        JOIN actor.org_unit_full_path(?) p ON (p.id = s.owner)
-                 WHERE CURRENT_DATE BETWEEN s.start_date AND s.end_date
+                 WHERE CURRENT_TIMESTAMP BETWEEN s.start_date AND s.end_date
        SQL
 
        my $sth = action::survey->db_Main->prepare_cached($select);
@@ -280,7 +280,7 @@ sub find_opac_surveys {
                SELECT  s.*
                  FROM  $s_table s
                        JOIN actor.org_unit_full_path(?) p ON (p.id = s.owner)
-                 WHERE CURRENT_DATE BETWEEN s.start_date AND s.end_date
+                 WHERE CURRENT_TIMESTAMP BETWEEN s.start_date AND s.end_date
                        AND s.opac IS TRUE;
        SQL
 
@@ -355,7 +355,7 @@ sub find_optional_surveys {
                SELECT  s.*
                  FROM  $s_table s
                        JOIN actor.org_unit_full_path(?) p ON (p.id = s.owner)
-                 WHERE CURRENT_DATE BETWEEN s.start_date AND s.end_date
+                 WHERE CURRENT_TIMESTAMP BETWEEN s.start_date AND s.end_date
                        AND s.required IS FALSE;
        SQL
 
@@ -385,7 +385,7 @@ sub find_required_surveys {
                SELECT  s.*
                  FROM  $s_table s
                        JOIN actor.org_unit_full_path(?) p ON (p.id = s.owner)
-                 WHERE CURRENT_DATE BETWEEN s.start_date AND s.end_date
+                 WHERE CURRENT_TIMESTAMP BETWEEN s.start_date AND s.end_date
                        AND s.required IS TRUE;
        SQL
 
@@ -415,7 +415,7 @@ sub find_usr_summary_surveys {
                SELECT  s.*
                  FROM  $s_table s
                        JOIN actor.org_unit_full_path(?) p ON (p.id = s.owner)
-                 WHERE CURRENT_DATE BETWEEN s.start_date AND s.end_date
+                 WHERE CURRENT_TIMESTAMP BETWEEN s.start_date AND s.end_date
                        AND s.usr_summary IS TRUE;
        SQL