[Bps-public-commit] rtx-calendar branch allow-custom-field-based-events updated. 1.05-16-g7265058

BPS Git Server git at git.bestpractical.com
Thu Aug 24 19:07:05 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 has been updated
       via  72650586f5057a7da712c9c3324603d1036387e4 (commit)
       via  db7281db5587192bd92c0566daccba98e1badfd8 (commit)
       via  1525452251653329e8249b83ee2bca7105588c1f (commit)
       via  8c18c89aa77ae6cb939d0c9c5a2d31419d309bc6 (commit)
      from  7b22f4f1274e65c3ad6a3eba6ee703c7b11431f7 (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 72650586f5057a7da712c9c3324603d1036387e4
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Aug 24 16:03:46 2023 -0300

    Update custom color feature to use reminder status
    
    It was coloring the event based on the associated ticket status, but
    the status of the reminder is more important.

diff --git a/html/Elements/CalendarEvent b/html/Elements/CalendarEvent
index 9a6750f..f684aa0 100644
--- a/html/Elements/CalendarEvent
+++ b/html/Elements/CalendarEvent
@@ -58,7 +58,7 @@ if ($Object->Type eq 'reminder') {
         $ticket   = $Object->RefersTo->First->TargetObj;
         $TicketId = $ticket->Id;
         $subject = $Object->Subject . " (" . $ticket->Subject . ")";
-        $status = $ticket->Status;
+        $status = $Object->Status;
     }
 } else {
     $TicketId = $Object->Id;

commit db7281db5587192bd92c0566daccba98e1badfd8
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Aug 24 14:54:21 2023 -0300

    Update CalendarSortEvents setting documentation
    
    Describe that the setting is a subroutine reference, and what it
    expects and returns.

diff --git a/lib/RTx/Calendar.pm b/lib/RTx/Calendar.pm
index faef4ac..780e59f 100644
--- a/lib/RTx/Calendar.pm
+++ b/lib/RTx/Calendar.pm
@@ -311,8 +311,12 @@ mouse over a date in F<etc/RT_SiteConfig.pm>:
 =head3 Event sorting
 
 You can set the order that the events will presented in the day cell with
-the C<$CalendarSortEvents> setting. The following example sorts
-the events by status:
+the C<$CalendarSortEvents> setting.
+
+This setting takes a subroutine reference that will receive an array of
+L<RT::Ticket> objects and should return a sorted array of L<RT::Ticket>.
+
+The following example sorts the events by status:
 
     Set($CalendarSortEvents, sub {
         my @Tickets = @_;

commit 1525452251653329e8249b83ee2bca7105588c1f
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Aug 24 14:51:10 2023 -0300

    Update POD organization
    
    Add third level headings to organize display configurations and
    make it easier to describe each feature.

diff --git a/lib/RTx/Calendar.pm b/lib/RTx/Calendar.pm
index 17c154c..faef4ac 100644
--- a/lib/RTx/Calendar.pm
+++ b/lib/RTx/Calendar.pm
@@ -294,16 +294,22 @@ C<$HomepageComponents> in F<etc/RT_SiteConfig.pm>:
 
 =head2 Display configuration
 
+=head3 Displaying the owner
+
 You can show the owner in each day box by adding this line to your
 F<etc/RT_SiteConfig.pm>:
 
     Set($CalendarDisplayOwner, 1);
 
+=head3 Displaying custom fields
+
 You can change which fields show up in the popup display when you
 mouse over a date in F<etc/RT_SiteConfig.pm>:
 
     Set(@CalendarPopupFields, ('Status', 'OwnerObj->Name', 'DueObj->ISO'));
 
+=head3 Event sorting
+
 You can set the order that the events will presented in the day cell with
 the C<$CalendarSortEvents> setting. The following example sorts
 the events by status:
@@ -314,6 +320,8 @@ the events by status:
         return @SortedTickets;
     });
 
+=head3 Event colors
+
 It's also possible to change the color of the events in the calendar by
 adding the C<$CalendarColorStatusMap> setting to your F<etc/RT_SiteConfig.pm>:
 
@@ -325,6 +333,8 @@ adding the C<$CalendarColorStatusMap> setting to your F<etc/RT_SiteConfig.pm>:
         'resolved'                              => '#aaa',
     ));
 
+=head3 Custom icons
+
 Custom Icons can be defined for the events in the calendar by adding the
 C<$CalendarCustomIcons> setting to your F<etc/RT_SiteConfig.pm>:
 

commit 8c18c89aa77ae6cb939d0c9c5a2d31419d309bc6
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Aug 24 14:46:17 2023 -0300

    Update Calendar sorting config name
    
    Update the config name from CalendarSortCalendarEvents to
    CalendarSortEvents.

diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index b037886..fe64d11 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -366,7 +366,7 @@ for my $Dates (keys %Tickets) {
 my $SortCalendarEvents = sub {
   return @_;
 };
-if (RT->Config->Get("CalendarSortCalendarEvents")) {
-  $SortCalendarEvents = RT->Config->Get("CalendarSortCalendarEvents");
+if (RT->Config->Get("CalendarSortEvents")) {
+  $SortCalendarEvents = RT->Config->Get("CalendarSortEvents");
 }
 </%INIT>
diff --git a/lib/RTx/Calendar.pm b/lib/RTx/Calendar.pm
index dd3a6fd..17c154c 100644
--- a/lib/RTx/Calendar.pm
+++ b/lib/RTx/Calendar.pm
@@ -305,10 +305,10 @@ mouse over a date in F<etc/RT_SiteConfig.pm>:
     Set(@CalendarPopupFields, ('Status', 'OwnerObj->Name', 'DueObj->ISO'));
 
 You can set the order that the events will presented in the day cell with
-the C<$CalendarSortCalendarEvents> setting. The following example sorts
+the C<$CalendarSortEvents> setting. The following example sorts
 the events by status:
 
-    Set($CalendarSortCalendarEvents, sub {
+    Set($CalendarSortEvents, sub {
         my @Tickets = @_;
         my @SortedTickets = sort { lc($a->Status) cmp lc($b->Status) } @Tickets;
         return @SortedTickets;

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

Summary of changes:
 html/Elements/CalendarEvent |  2 +-
 html/Search/Calendar.html   |  4 ++--
 lib/RTx/Calendar.pm         | 20 +++++++++++++++++---
 3 files changed, 20 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
rtx-calendar


More information about the Bps-public-commit mailing list