[Bps-public-commit] rtx-calendar branch allow-custom-field-based-events-2 updated. 1.05-18-gd0ccece

BPS Git Server git at git.bestpractical.com
Thu Sep 7 19:53:20 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rtx-calendar".

The branch, allow-custom-field-based-events-2 has been updated
       via  d0ccece0861acaed6dcfd32096a7c31976ae21bc (commit)
      from  4ccceb099dd94bf2ea1d544dba8ceeaec913f7b7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d0ccece0861acaed6dcfd32096a7c31976ae21bc
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Sep 7 16:25:29 2023 -0300

    Fix missing Calendar.html Format when accessing from MyCalendar
    
    There was a situation where the Download Spreadsheet link was not
    working due to the Format attribute not being set.  This comes from
    the default "calendar" search and was only setting the TempFormat
    variable. Fixed that by setting the Format variable with the TempoFormat
    if not set yet.
    
    Also moved the Query String builder, which is used by the Filter On Status
    form and the link to change month and was also missing the Format
    attribute.

diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index 42a5306..5ba02af 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -301,20 +301,6 @@ if ($FilterOnStatus[0]) {
   $Query .= "($StatusClause)";
 }
 
-my $QueryString =
-      $m->comp(
-        '/Elements/QueryString',
-        Query   => $BaseQuery,
-        FilterOnStatus => \@FilterOnStatus,
-        Format  => $Format,
-        Order   => $Order,
-        OrderBy => $OrderBy,
-        Rows    => $RowsPerPage
-      )
-      if ($Query);
-
-$QueryString ||= 'NewQuery=1';
-
 # Default Query and Format
 my $TempFormat = "__Starts__ __Due__";
 my $TempQuery = "( Status = 'new' OR Status = 'open' OR Status = 'stalled')
@@ -329,6 +315,21 @@ if ( my $Search = RTx::Calendar::SearchDefaultCalendar($session{CurrentUser}) )
 # we overide them if needed
 $TempQuery  = $Query  if $Query;
 $TempFormat = $Format if $Format;
+$Format = $TempFormat unless $Format;
+
+my $QueryString =
+      $m->comp(
+        '/Elements/QueryString',
+        Query   => $BaseQuery,
+        FilterOnStatus => \@FilterOnStatus,
+        Format  => $Format,
+        Order   => $Order,
+        OrderBy => $OrderBy,
+        Rows    => $RowsPerPage
+      )
+      if ($Query);
+
+$QueryString ||= 'NewQuery=1';
 
 # we search all date types in Format string
 my @CoreDates    = grep { $TempFormat =~ m/__${_}(Relative)?__/ } @DateTypes;

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

Summary of changes:
 html/Search/Calendar.html | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
rtx-calendar


More information about the Bps-public-commit mailing list