[Rt-commit] rt branch, 4.4/timeworked-per-user, updated. rt-4.2.11-132-g36e9b6c

Todd Wade todd at bestpractical.com
Tue Aug 4 20:40:03 EDT 2015


The branch, 4.4/timeworked-per-user has been updated
       via  36e9b6c76d8d91d982107d657ac8cf7d6ef5c4ca (commit)
      from  f02663ef6710ad2604ab7dd3158e32af0351d13e (commit)

Summary of changes:
 etc/upgrade/{4.4.0rc1 => 4.3.8}/content |  9 +++--
 lib/RT/Action/UpdateParentTimeWorked.pm | 69 +++++++++++++++++++++++++++++++++
 lib/RT/Action/UpdateUserTimeWorked.pm   | 68 ++++++++++++++++++++++++++++++++
 lib/RT/Condition/TimeWorkedChange.pm    | 65 +++++++++++++++++++++++++++++++
 4 files changed, 208 insertions(+), 3 deletions(-)
 rename etc/upgrade/{4.4.0rc1 => 4.3.8}/content (92%)

- Log -----------------------------------------------------------------
commit 36e9b6c76d8d91d982107d657ac8cf7d6ef5c4ca
Author: Todd Wade <todd at bestpractical.com>
Date:   Tue Aug 4 20:05:39 2015 -0400

    cleanup for policy tests / move upgrade file to better location

diff --git a/etc/upgrade/4.4.0rc1/content b/etc/upgrade/4.3.8/content
similarity index 92%
rename from etc/upgrade/4.4.0rc1/content
rename to etc/upgrade/4.3.8/content
index 505741b..e1949b5 100644
--- a/etc/upgrade/4.4.0rc1/content
+++ b/etc/upgrade/4.3.8/content
@@ -1,4 +1,7 @@
- at ScripActions = (
+use warnings;
+use strict;
+
+our @ScripActions = (
     {
         Name        => 'Update Parent TimeWorked',    # loc
         Description => 'Update Parent TimeWorked',    # loc
@@ -12,7 +15,7 @@
 );
 
 
- at ScripConditions = (
+our @ScripConditions = (
     {
         Name                 => 'On TimeWorked Change',        # loc
         Description          => 'When TimeWorked Change',    # loc
@@ -21,7 +24,7 @@
     },
 );
 
- at Scrips = (
+our @Scrips = (
     {
         Description    => 'On TimeWorked Change Update Parent TimeWorked',
         ScripCondition => 'On TimeWorked Change',
diff --git a/lib/RT/Action/UpdateParentTimeWorked.pm b/lib/RT/Action/UpdateParentTimeWorked.pm
index e91479a..6904f55 100644
--- a/lib/RT/Action/UpdateParentTimeWorked.pm
+++ b/lib/RT/Action/UpdateParentTimeWorked.pm
@@ -1,9 +1,72 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+#                                          <sales at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
 use strict;
 use warnings;
 
 package RT::Action::UpdateParentTimeWorked;
 use base 'RT::Action';
 
+=head1 NAME
+
+RT::Action::UpdateParentTimeWorked - RT's scrip action to set/update the time
+worked on a parent ticket when a child ticket's TimeWorked is added to.
+
+=head1 DESCRIPTION
+
+This action is used as an action for the 'On TimeWorked Change' condition.
+
+When it fires it finds a ticket's parent tickets and increments the time on
+those tickets along with the built in behavior of incrementing the TimeWorked
+on the current ticket.
+
+=cut
+
 sub Prepare {
     my $self = shift;
     my $ticket = $self->TicketObj;
@@ -40,4 +103,10 @@ sub Commit {
     }
 }
 
+=head1 AUTHOR
+
+Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
+
+=cut
+
 1;
diff --git a/lib/RT/Action/UpdateUserTimeWorked.pm b/lib/RT/Action/UpdateUserTimeWorked.pm
index 74afb09..ddd221b 100644
--- a/lib/RT/Action/UpdateUserTimeWorked.pm
+++ b/lib/RT/Action/UpdateUserTimeWorked.pm
@@ -1,9 +1,71 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+#                                          <sales at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
 use strict;
 use warnings;
 
 package RT::Action::UpdateUserTimeWorked;
 use base 'RT::Action';
 
+=head1 NAME
+
+RT::Action::UpdateUserTimeWorked - RT's scrip action to set/update the time
+worked for a user each time they log time worked on a ticket
+
+=head1 DESCRIPTION
+
+This action is used as an action for the 'On TimeWorked Change' condition.
+
+When it fires, a ticket attribute stores the amount of time the user updating
+the ticket worked on it.
+
+=cut
+
 sub Prepare {
     return 1;
 }
@@ -24,4 +86,10 @@ sub Commit {
     }
 }
 
+=head1 AUTHOR
+
+Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
+
+=cut
+
 1;
diff --git a/lib/RT/Condition/TimeWorkedChange.pm b/lib/RT/Condition/TimeWorkedChange.pm
index f6d9322..469cb2b 100644
--- a/lib/RT/Condition/TimeWorkedChange.pm
+++ b/lib/RT/Condition/TimeWorkedChange.pm
@@ -1,9 +1,69 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+#                                          <sales at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
 use strict;
 use warnings;
 
 package RT::Condition::TimeWorkedChange;
 use base 'RT::Condition';
 
+=head1 NAME
+
+RT::Condition::TimeWorkedChange - RT's scrip condition that fires when the
+TimeWorked field has a value at form submission.
+
+=head1 DESCRIPTION
+
+This condition is true when the transaction has a TimeTaken value or the
+TimeWorked field is being updated.
+
+=cut
+
 sub IsApplicable {
     my $self = shift;
     my $txn = $self->TransactionObj;
@@ -15,5 +75,10 @@ sub IsApplicable {
     return 0;
 }
 
+=head1 AUTHOR
+
+Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
+
+=cut
 
 1;

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


More information about the rt-commit mailing list