[Bps-public-commit] rt-extension-timetracking-automatic branch, track-creation-time, updated. 4b828459f2282f8f689c964fbbe33354b5b295c7

Jim Brandt jbrandt at bestpractical.com
Thu Oct 6 15:43:38 EDT 2016


The branch, track-creation-time has been updated
       via  4b828459f2282f8f689c964fbbe33354b5b295c7 (commit)
      from  d2ca73553e4220396403e3c3986acffc47f38d80 (commit)

Summary of changes:
 Changes                                    |  3 +++
 MANIFEST                                   |  8 ++++++++
 META.yml                                   |  2 +-
 README                                     | 20 ++++++++++----------
 lib/RT/Extension/TimeTracking/Automatic.pm | 18 +++++++++---------
 patches/incident_create_callback.patch     | 20 ++++++++++++++++++++
 6 files changed, 51 insertions(+), 20 deletions(-)
 create mode 100644 patches/incident_create_callback.patch

- Log -----------------------------------------------------------------
commit 4b828459f2282f8f689c964fbbe33354b5b295c7
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Oct 6 15:42:07 2016 -0400

    Prep for 0.02 release

diff --git a/Changes b/Changes
index 7556227..1d08241 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,7 @@
 Revision history for RT-Extension-TimeTracking-Automatic
 
+0.02 2016-10-06
+ - Also auto-track time on create.
+
 0.01 2016-09-15
  - Initial version
diff --git a/MANIFEST b/MANIFEST
index 72c84ca..efaf3cf 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,8 +1,15 @@
 Changes
+html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Create.html/AfterRequestors
+html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Create.html/BeforeDisplay
+html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Display.html/BeforeActionList
+html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Incident/Create.html/AfterHidden
+html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Incident/Create.html/ProcessArguments
 html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Incident/Reply/index.html/AfterHidden
 html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Incident/Reply/index.html/BeforeDisplay
 html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Update.html/AfterWorked
 html/Callbacks/RT-Extension-TimeTracking-Automatic/RTIR/Update.html/BeforeDisplay
+html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Create.html/FormStart
+html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Display.html/Initial
 html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Update.html/AfterWorked
 html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Update.html/BeforeDisplay
 inc/Module/Install.pm
@@ -22,6 +29,7 @@ lib/RT/Extension/TimeTracking/Automatic.pm
 Makefile.PL
 MANIFEST			This list of files
 META.yml
+patches/incident_create_callback.patch
 patches/patch-rtir-3.2.patch
 README
 t/basic.t
diff --git a/META.yml b/META.yml
index 2cc3356..2119e18 100644
--- a/META.yml
+++ b/META.yml
@@ -24,7 +24,7 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-timetracking-automatic
-version: '0.01'
+version: '0.02'
 x_module_install_rtx_version: '0.38'
 x_requires_rt: 4.2.0
 x_rt_too_new: 4.6.0
diff --git a/README b/README
index 204cd17..f955270 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
 NAME
-    RT-Extension-TimeTracking-Automatic - Automatic Time Tracking Extension
+    RT-Extension-TimeTracking-Automatic
 
 RT VERISION
     Works with RT 4.2 and RT 4.4, as well as RTIR
@@ -25,14 +25,14 @@ INSTALLATION
         This setting is optional and will default to 0 additional minutes.
 
     Patching RTIR
-        If you are using RTIR-3.2 it is necessary to patch RTIR/Update.html
-        to enable automatic time tracking:
+        If you are using RTIR-3.2.0 apply the following patches:
 
-                patch -d /path/to/rtir -p1 < patches/patch-rtir-3.2.patch
-                cd /path/to/rtir && make install
+            patch -d /path/to/rtir -p1 < patches/patch-rtir-3.2.patch
+            patch -d /path/to/rtir -p1 < patches/incident_create_callback.patch
+            cd /path/to/rtir && make install
 
-        This will simply add a callback to the update ticket page, and is
-        safe to leave should you disable automatic time tracking.
+        These add callbacks and it is safe to leave them in place should you
+        disable automatic time tracking.
 
     Clear the mason cache
         To clear your cache run the following command:
@@ -43,9 +43,9 @@ INSTALLATION
         Restart the websever to have the extension take affect.
 
 DESCRIPTION
-    RT::Extension::TimeTracking::Automatic automatically tracks the time
-    taken commenting on or replying to a ticket. The time spent editing the
-    ticket will update the TimeWorked on the Ticket itself, and create a
+    RT::Extension::TimeTracking::Automatic automatically tracks time when
+    creating, commenting on, or replying to a ticket. The time spent editing
+    the ticket will update the TimeWorked on the Ticket itself, and create a
     transaction logging how long the user took to comment on or reply to the
     ticket.
 
diff --git a/lib/RT/Extension/TimeTracking/Automatic.pm b/lib/RT/Extension/TimeTracking/Automatic.pm
index 078e470..e431b59 100644
--- a/lib/RT/Extension/TimeTracking/Automatic.pm
+++ b/lib/RT/Extension/TimeTracking/Automatic.pm
@@ -2,13 +2,13 @@ use strict;
 use warnings;
 package RT::Extension::TimeTracking::Automatic;
 
-our $VERSION = '0.01';
+our $VERSION = '0.02';
 
 =pod
 
 =head1 NAME
 
-RT-Extension-TimeTracking-Automatic - Automatic Time Tracking Extension
+RT-Extension-TimeTracking-Automatic
 
 =head1 RT VERISION
 
@@ -41,13 +41,13 @@ This setting is optional and will default to 0 additional minutes.
 
 =item Patching RTIR
 
-If you are using RTIR-3.2 it is necessary to patch RTIR/Update.html to enable
-automatic time tracking:
+If you are using RTIR-3.2.0 apply the following patches:
 
-	patch -d /path/to/rtir -p1 < patches/patch-rtir-3.2.patch
-	cd /path/to/rtir && make install
+    patch -d /path/to/rtir -p1 < patches/patch-rtir-3.2.patch
+    patch -d /path/to/rtir -p1 < patches/incident_create_callback.patch
+    cd /path/to/rtir && make install
 
-This will simply add a callback to the update ticket page, and is safe to leave
+These add callbacks and it is safe to leave them in place
 should you disable automatic time tracking.
 
 =item Clear the mason cache
@@ -64,8 +64,8 @@ Restart the websever to have the extension take affect.
 
 =head1 DESCRIPTION
 
-RT::Extension::TimeTracking::Automatic automatically tracks the time taken 
-commenting on or replying to a ticket.  The time spent editing the ticket
+RT::Extension::TimeTracking::Automatic automatically tracks time when creating,
+commenting on, or replying to a ticket.  The time spent editing the ticket
 will update the TimeWorked on the Ticket itself, and create a transaction
 logging how long the user took to comment on or reply to the ticket.
 
diff --git a/patches/incident_create_callback.patch b/patches/incident_create_callback.patch
new file mode 100644
index 0000000..1f422fa
--- /dev/null
+++ b/patches/incident_create_callback.patch
@@ -0,0 +1,20 @@
+commit 529b8ed73764058b8b88d5ad6421aa4dc2cf54b2
+Author: Dave Goehrig <dave at bestpractical.com>
+Date:   Tue Oct 4 15:28:34 2016 -0400
+
+    add afterhidden callback to incident/create.html
+
+diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
+index 330dcbb..c81c978 100644
+--- a/html/RTIR/Incident/Create.html
++++ b/html/RTIR/Incident/Create.html
+@@ -79,6 +79,9 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
+ % if ( $Split ) {
+ <input type="hidden" name="Split"        value="<% $SplitObj->id %>" />
+ % }
++
++% $m->callback( CallbackName => 'AfterHidden', ARGSRef => \%ARGS );
++
+ <a name="top"></a>
+ 
+ <& /Elements/Crypt/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>

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


More information about the Bps-public-commit mailing list