[Rt-commit] rtir branch, 5.0/updated-reporting, created. 4.0.1rc1-142-g3eef2156

Craig Kaiser craig at bestpractical.com
Fri May 29 17:31:48 EDT 2020


The branch, 5.0/updated-reporting has been created
        at  3eef21565b37432cdcbfd7e1065577ce6398423d (commit)

- Log -----------------------------------------------------------------
commit b024df0a0b7249a2f6aed48c0e1cf155eb6d2e50
Author: craig kaiser <craig at bestpractical.com>
Date:   Fri May 29 15:00:09 2020 -0400

    Use ISO format for RTIR report date default values
    
    If the `$date->AsString` method is used for the date default value then
    the date picker JS will not register "OnClick" until the date value is
    cleared.

diff --git a/html/RTIR/Reporting/index.html b/html/RTIR/Reporting/index.html
index 492507b0..3e524813 100644
--- a/html/RTIR/Reporting/index.html
+++ b/html/RTIR/Reporting/index.html
@@ -68,7 +68,7 @@
         <&|/l&>Start Date:</&>
       </div>
       <div class="value col-md-9">
-        <& /Elements/SelectDate, Name => 'StartDate', Default => $start->AsString &>
+        <& /Elements/SelectDate, Name => 'StartDate', Default => $start->ISO &>
       </div>
     </div>
     <div class="form-row">
@@ -76,7 +76,7 @@
         <&|/l&>End Date:</&>
       </div>
       <div class="value col-md-9">
-        <& /Elements/SelectDate, Name => 'EndDate', Default => $end->AsString &>
+        <& /Elements/SelectDate, Name => 'EndDate', Default => $end->ISO &>
       </div>
     </div>
   </div>

commit 3eef21565b37432cdcbfd7e1065577ce6398423d
Author: craig kaiser <craig at bestpractical.com>
Date:   Fri May 29 15:30:34 2020 -0400

    Only change links for search if search exist

diff --git a/html/Callbacks/RTIR/Elements/ShowSearch/ModifySearch b/html/Callbacks/RTIR/Elements/ShowSearch/ModifySearch
index d9b61351..fa4a3bee 100644
--- a/html/Callbacks/RTIR/Elements/ShowSearch/ModifySearch
+++ b/html/Callbacks/RTIR/Elements/ShowSearch/ModifySearch
@@ -54,8 +54,10 @@ if (my $c = $m->{'RTIR_ConstituencyFilter'}) {
 # If we're inside RTIR, try to make all the ticket search links point to RTIR
 # A better implementation would check that the ticket is an RTIR ticket, but that
 # would be very, very, computationally intensive
-$OriginalSearch->{Format} =~ s/__WebPath__\/Ticket\/Display.html\?id=__id__/__RTIRTicketURI__/gsm;
-$Search->{Format} =~ s/__WebPath__\/Ticket\/Display.html\?id=__id__/__RTIRTicketURI__/gsm;
+if ($OriginalSearch->{Format} or $Search->{Format} ) {
+    $OriginalSearch->{Format} =~ s/__WebPath__\/Ticket\/Display.html\?id=__id__/__RTIRTicketURI__/gsm;
+    $Search->{Format} =~ s/__WebPath__\/Ticket\/Display.html\?id=__id__/__RTIRTicketURI__/gsm;
+}
 </%init>
 <%args>
 $OriginalSearch => undef

-----------------------------------------------------------------------


More information about the rt-commit mailing list