[Rt-commit] rt branch, update-action, updated. 6403eb90494882e0c42ec4fb53b2b31287e3cd25

sartak at bestpractical.com sartak at bestpractical.com
Tue Jan 19 21:52:28 EST 2010


The branch, update-action has been updated
       via  6403eb90494882e0c42ec4fb53b2b31287e3cd25 (commit)
       via  014b996c747f234f0d1557f83c0fc1b84ec5d93e (commit)
      from  2ecfca5748cc60a0614ae31adf3d6ce09c64a915 (commit)

Summary of changes:
 lib/RT/Dispatcher.pm                   |    2 +-
 share/html/Ticket/Elements/ShowSummary |    4 +-
 share/html/Ticket/Modify.html          |  106 --------------------------------
 t/web/cf_select_one.t                  |    6 +-
 4 files changed, 6 insertions(+), 112 deletions(-)
 delete mode 100755 share/html/Ticket/Modify.html

- Log -----------------------------------------------------------------
commit 014b996c747f234f0d1557f83c0fc1b84ec5d93e
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jan 19 21:35:26 2010 -0500

    Get rid of /Ticket/Modify.html

diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
deleted file mode 100755
index 577b492..0000000
--- a/share/html/Ticket/Modify.html
+++ /dev/null
@@ -1,106 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse 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 }}}
-<&| /_elements/wrapper, title => _('Modify ticket #%1', $ticket_obj->id) &>
-<& /Elements/Tabs,
-    ticket => $ticket_obj, current_subtab => "Ticket/Modify.html?id=".$ticket_obj->id, 
-    title => _('Modify ticket #%1', $ticket_obj->id) &>
-
-% $m->callback(callback_name => 'BeforeActionList', actions => \@results, args_ref => \%ARGS, ticket => $ticket_obj);
-
-<& /Elements/ListActions, actions => \@results &>
-<% Jifty->web->form->start( name => 'ticket_modify', submit_to => '?id=' . $ticket_obj->id ) %>
-% $m->callback( callback_name => 'FormStart', args_ref => \%ARGS );
-<input type="hidden" class="hidden" name="id" value="<% $ticket_obj->id %>" />
-
-<&| /Widgets/TitleBox, title => _('Modify ticket #%1',$ticket_obj->id), class=>'ticket-info-basics' &>
-% for my $field ( @fields ) {
-<% $action->form_field( $field ) %>
-% }
-<& Elements/EditCustomFields, ticket_obj => $ticket_obj &>
-</&>
-
-<& /Elements/Submit, name => 'submit_ticket', label => _('Save Changes'), caption => _("If you've updated anything above, be sure to"), color => "#993333" &>
-</form>
-</&>
-<%INIT>
-  
-my @fields = qw/subject status queue owner time_estimated time_worked
-time_left initial_priority final_priority/;
-my $ticket_obj = load_ticket($id);
-my $action = Jifty->web->new_action( class => 'UpdateTicket', record =>
-        $ticket_obj );
-my $CustomFields = $ticket_obj->queue->ticket_custom_fields();
-
-# call this to show up hints of valid cf values.
-$m->comp(
-    '/Elements/ValidateCustomFields',
-    custom_fields => $CustomFields,
-    args_ref => {},
-);
-
-# Now let callbacks have a chance at editing %ARGS
-$m->callback( ticket_obj => $ticket_obj, custom_fields => $CustomFields, args_ref => \%ARGS );
-
-my @results = ();
-
-# undef so that transaction_batch scrips run and update the ticket
-$ticket_obj = undef;
-$ticket_obj = load_ticket($id);
-
-# TODO: display the results, even if we can't display the ticket
-
-unless ($ticket_obj->current_user_has_right('ShowTicket')) {
-    abort("No permission to view ticket");
-} 
-
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>

commit 6403eb90494882e0c42ec4fb53b2b31287e3cd25
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jan 19 21:41:33 2010 -0500

    Link to and check for /ticket/modify not /Ticket/Modify.html

diff --git a/lib/RT/Dispatcher.pm b/lib/RT/Dispatcher.pm
index 474c9a2..80da6ed 100644
--- a/lib/RT/Dispatcher.pm
+++ b/lib/RT/Dispatcher.pm
@@ -534,7 +534,7 @@ before qr'(?:Ticket|Search)/' => run {
         page_nav->child( _('Display') => url => "/Ticket/Display.html?id=" . $id );
 
         page_nav->child( _('History') => url => "/Ticket/History.html?id=" . $id );
-        page_nav->child( _('Basics')  => url => "/Ticket/Modify.html?id=" . $id );
+        page_nav->child( _('Basics')  => url => "/ticket/modify?id=" . $id );
 
         page_nav->child( _('Dates') => url => "/Ticket/ModifyDates.html?id=" . $id );
         page_nav->child( _('People'), url => "/Ticket/ModifyPeople.html?id=" . $id );
diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
index 0016a6c..2747dc7 100755
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@ -49,14 +49,14 @@
       <tr>
 	<td valign="top" class="boxcontainer">
 	  <&| /Widgets/TitleBox, title => _('The Basics'), 
-		title_href => RT->config->get('web_path')."/Ticket/Modify.html?id=".$ticket->id, 
+		title_href => RT->config->get('web_path')."/ticket/modify?id=".$ticket->id, 
 		class => 'ticket-info-basics' &>
 	        <& /Ticket/Elements/ShowBasics, ticket => $ticket &>
 	  </&>
 
 % if ($ticket->queue->ticket_custom_fields->first) {
 	  <&| /Widgets/TitleBox, title => _('Custom Fields'), 
-		title_href => RT->config->get('web_path')."/Ticket/Modify.html?id=".$ticket->id, 
+		title_href => RT->config->get('web_path')."/ticket/modify?id=".$ticket->id, 
 		class => 'ticket-info-cfs'  &> 
 	        <& /Ticket/Elements/ShowCustomFields, ticket => $ticket &>
 	  </&>
diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index 85ca3b0..2db5166 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -92,7 +92,7 @@ diag "check that values of the CF are case insensetive(asd vs. ASD)"
     if $ENV{'TEST_VERBOSE'};
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( url_regex => qr{Ticket/Modify.html} );
+    $m->follow_link( url_regex => qr{ticket/modify} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
@@ -114,7 +114,7 @@ diag "check that 0 is ok value of the CF"
     if $ENV{'TEST_VERBOSE'};
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( url_regex => qr{Ticket/Modify.html} );
+    $m->follow_link( url_regex => qr{ticket/modify} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
@@ -139,7 +139,7 @@ diag "check that we can set empty value when the current is 0"
     if $ENV{'TEST_VERBOSE'};
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( url_regex => qr{Ticket/Modify.html} );
+    $m->follow_link( url_regex => qr{ticket/modify} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 

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


More information about the Rt-commit mailing list