Extension - Queue Change On Update: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
(Added link since old is broken)
Line 20: Line 20:
;[http://pleh.info/_export/code/wiki/rt/rt-extension-queuechangeonupdate?codeblock=0 RT-Extension-QueueChangeOnUpdate.sh]
;[http://pleh.info/_export/code/wiki/rt/rt-extension-queuechangeonupdate?codeblock=0 RT-Extension-QueueChangeOnUpdate.sh]
;
;
 
<code>  
#!/bin/bash
#!/bin/bash
 
# ---
# ---
# This script installs the Request Tracker plugin RT::Extension::QueueChangeOnUpdate
# This script installs the Request Tracker plugin RT::Extension::QueueChangeOnUpdate
# ---
# ---
 
 
# RT installation path
# RT installation path
rt_dir=/opt/rt4
rt_dir=/opt/rt4
 
 
# Plugin directory paths
# Plugin directory paths
UpdateHTML_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/html/Callbacks/QueueChangeOnUpdate/Ticket/Update.html
UpdateHTML_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/html/Callbacks/QueueChangeOnUpdate/Ticket/Update.html
Extension_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/lib/RT/Extension
Extension_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/lib/RT/Extension
lib_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/lib
lib_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/lib
 
 
# ---
# ---
# Create the directories, this is based on an RT installation in /opt/rt4
# Create the directories, this is based on an RT installation in /opt/rt4
# ---
# ---
 
 
mkdir -p $rt_dir/$UpdateHTML_dir
mkdir -p $rt_dir/$UpdateHTML_dir
mkdir -p $rt_dir/$Extension_dir
mkdir -p $rt_dir/$Extension_dir
 
 
# ---
# ---
# Create the AfterWorked file
# Create the AfterWorked file
# ---
# ---
 
 
echo '<tr>
echo '<tr>
<td class="label">Queue:</td>
<td class="label">Queue:</td>
<td>
<td>
<& /Elements/SelectQueue,
<& /Elements/SelectQueue,
Name => "Queue",
Name => "Queue",
Default => $Ticket->QueueObj->Id,
Default => $Ticket->QueueObj->Id,
InTable => 1,
InTable => 1,
&>
&>
</td>
</td>
</tr>
</tr>
<%ARGS>
<%ARGS>
$Ticket
$Ticket
</%ARGS>' > $rt_dir/$UpdateHTML_dir/AfterWorked
</%ARGS>' > $rt_dir/$UpdateHTML_dir/AfterWorked
 
 
# ---
# ---
# Create the perllocal.pod file
# Create the perllocal.pod file
# ---
# ---
 
 
echo '=head2 Mon Feb 13 09:52:24 2012: C<Module> L<rt::Extension::QueueChangeOnUpdate|RT::Extension::QueueChangeOnUpdate>
echo '=head2 Mon Feb 13 09:52:24 2012: C<Module> L<RT::Extension::QueueChangeOnUpdate|RT::Extension::QueueChangeOnUpdate>
 
 
=over 4
=over 4
 
 
=item *
=item *
 
 
C<installed into: /opt/rt4/local/plugins/RT-Extension-QueueChangeOnUpdate/lib>
C<installed into: /opt/rt4/local/plugins/RT-Extension-QueueChangeOnUpdate/lib>
 
 
=item *
=item *
 
 
C<LINKTYPE: dynamic>
C<LINKTYPE: dynamic>
 
 
=item *
=item *
 
 
C<VERSION: 0.01>
C<VERSION: 0.01>
 
 
=item *
=item *
 
 
C<EXE_FILES: >
C<EXE_FILES: >
 
 
=back
=back
 
 
=head2 Mon Feb 13 11:52:17 2012: C<Module> L<RT::Extension::QueueChangeOnUpdate|RT::Extension::QueueChangeOnUpdate>
=head2 Mon Feb 13 11:52:17 2012: C<Module> L<RT::Extension::QueueChangeOnUpdate|RT::Extension::QueueChangeOnUpdate>
 
 
=over 4
=over 4
 
 
=item *
=item *
 
 
C<installed into: /opt/rt4/local/plugins/RT-Extension-QueueChangeOnUpdate/lib>
C<installed into: /opt/rt4/local/plugins/RT-Extension-QueueChangeOnUpdate/lib>
 
 
=item *
=item *
 
 
C<LINKTYPE: dynamic>
C<LINKTYPE: dynamic>
 
 
=item *
=item *
 
 
C<VERSION: 0.01>
C<VERSION: 0.01>
 
 
=item *
=item *
 
 
C<EXE_FILES: >
C<EXE_FILES: >
 
 
=back' > $rt_dir/$lib_dir/perllocal.pod
=back' > $rt_dir/$lib_dir/perllocal.pod
 
 
# ---
# ---
# Create the QueueChangeOnUpdate.pm file
# Create the QueueChangeOnUpdate.pm file
# ---
# ---
 
 
echo "use 5.008003;
echo "use 5.008003;
use strict;
use strict;
use warnings;
use warnings;
 
 
package RT::Extension::QueueChangeOnUpdate;
package RT::Extension::QueueChangeOnUpdate;
 
 
our \$VERSION = '0.01';
our \$VERSION = '0.01';
 
 
=head1 NAME
=head1 NAME
 
 
RT::Extension::QueueChangeOnUpdate - edit ticket's Queue on reply/comment
RT::Extension::QueueChangeOnUpdate - edit ticket's Queue on reply/comment
 
 
=head1 DESCRIPTION
=head1 DESCRIPTION
 
 
This extension adds often requested feature - update of ticket's Queue on
This extension adds often requested feature - update of ticket's Queue on
reply and comment.
reply and comment.
 
 
This is for RT 4.0.x.
This is for RT 4.0.x.
 
 
=head1 INSTALLATION
=head1 INSTALLATION
 
 
To install run the script, it'll create all the files and directories.
To install run the script, it'll create all the files and directories.
 
 
Register 'RT::Extension::QueueChangeOnUpdate' in the site config;
Register 'RT::Extension::QueueChangeOnUpdate' in the site config;
 
 
    Set(@Plugins, qw(
    Set(@Plugins, qw(
        RT::Extension::QueueChangeOnUpdate
        RT::Extension::QueueChangeOnUpdate
        ... other plugins you may have ...
        ... other plugins you may have ...
    ));
    ));
 
 
If you're also using RT::Extension::CustomFieldsOnUpdate then make sure
If you're also using RT::Extension::CustomFieldsOnUpdate then make sure
you include the QueueChangeOnUpdate plugin before the CustomFieldsOnUpdate.
you include the QueueChangeOnUpdate plugin before the CustomFieldsOnUpdate.
 
 
    Set(@Plugins, qw(
    Set(@Plugins, qw(
        RT::Extension::QueueChangeOnUpdate
        RT::Extension::QueueChangeOnUpdate
        RT::Extension::CustomFieldsOnUpdate
        RT::Extension::CustomFieldsOnUpdate
        ... other plugins you may have ...
        ... other plugins you may have ...
    ));
    ));
 
 
=cut
=cut
 
 
=head1 AUTHOR
=head1 AUTHOR
 
 
Bart E<lt>bart@pleh.infoE<gt>
Bart E<lt>bart@pleh.infoE<gt>
 
 
=head1 LICENSE
=head1 LICENSE
 
 
Under the same terms as perl itself.
Under the same terms as perl itself.
 
 
=cut
=cut
 
 
1;" > $rt_dir/$Extension_dir/QueueChangeOnUpdate.pm</rt>
1;" > $rt_dir/$Extension_dir/QueueChangeOnUpdate.pm</rt></code>
  Add the option to change the queue during a comment or reply
  Add the option to change the queue during a comment or reply
[[Category:Contribution]]
[[Category:Contribution]]

Revision as of 10:00, 27 October 2016

Below the installer script for the RT plugin QueueChangeOnUpdate.

This plugin adds a dropdown box to your ticket update page (comment/reply page) which will allow you to change the queue of a ticket along with adding a comment/reply.

This extension still works for RT 4.2.*

Source

This extension was originally posted on:

Link

Link to the old .sh file

Installation script

Create this script on your RT instance (this was tested on Debian), running it will create the required files (everything it does is written in the script, no secrets there ^_~).

This was inspirerd by the Custom Fields On Update extension by Ruslan and works verry well allong with it.


RT-Extension-QueueChangeOnUpdate.sh

 

  1. !/bin/bash
  1. ---
  2. This script installs the Request Tracker plugin RT::Extension::QueueChangeOnUpdate
  3. ---
  1. RT installation path

rt_dir=/opt/rt4

  1. Plugin directory paths

UpdateHTML_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/html/Callbacks/QueueChangeOnUpdate/Ticket/Update.html Extension_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/lib/RT/Extension lib_dir=local/plugins/RT-Extension-QueueChangeOnUpdate/lib

  1. ---
  2. Create the directories, this is based on an RT installation in /opt/rt4
  3. ---

mkdir -p $rt_dir/$UpdateHTML_dir mkdir -p $rt_dir/$Extension_dir

  1. ---
  2. Create the AfterWorked file
  3. ---

echo ' Queue:

<& /Elements/SelectQueue, Name => "Queue", Default => $Ticket->QueueObj->Id, InTable => 1, &>

<%ARGS> $Ticket </%ARGS>' > $rt_dir/$UpdateHTML_dir/AfterWorked

  1. ---
  2. Create the perllocal.pod file
  3. ---

echo '=head2 Mon Feb 13 09:52:24 2012: C<Module> L<RT::Extension::QueueChangeOnUpdate|RT::Extension::QueueChangeOnUpdate> =over 4 =item * C<installed into: /opt/rt4/local/plugins/RT-Extension-QueueChangeOnUpdate/lib> =item * C<LINKTYPE: dynamic> =item * C<VERSION: 0.01> =item * C<EXE_FILES: > =back =head2 Mon Feb 13 11:52:17 2012: C<Module> L<RT::Extension::QueueChangeOnUpdate|RT::Extension::QueueChangeOnUpdate> =over 4 =item * C<installed into: /opt/rt4/local/plugins/RT-Extension-QueueChangeOnUpdate/lib> =item * C<LINKTYPE: dynamic> =item * C<VERSION: 0.01> =item * C<EXE_FILES: > =back' > $rt_dir/$lib_dir/perllocal.pod

  1. ---
  2. Create the QueueChangeOnUpdate.pm file
  3. ---

echo "use 5.008003; use strict; use warnings; package RT::Extension::QueueChangeOnUpdate; our \$VERSION = '0.01'; =head1 NAME RT::Extension::QueueChangeOnUpdate - edit ticket's Queue on reply/comment =head1 DESCRIPTION This extension adds often requested feature - update of ticket's Queue on reply and comment. This is for RT 4.0.x. =head1 INSTALLATION To install run the script, it'll create all the files and directories. Register 'RT::Extension::QueueChangeOnUpdate' in the site config; Set(@Plugins, qw( RT::Extension::QueueChangeOnUpdate ... other plugins you may have ... )); If you're also using RT::Extension::CustomFieldsOnUpdate then make sure you include the QueueChangeOnUpdate plugin before the CustomFieldsOnUpdate. Set(@Plugins, qw( RT::Extension::QueueChangeOnUpdate RT::Extension::CustomFieldsOnUpdate ... other plugins you may have ... )); =cut =head1 AUTHOR Bart E<lt>bart@pleh.infoE<gt> =head1 LICENSE Under the same terms as perl itself. =cut 1;" > $rt_dir/$Extension_dir/QueueChangeOnUpdate.pm Add the option to change the queue during a comment or reply