Extension - Queue Change On Update: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
m (4 revisions imported)
 
(tested script)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
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 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.*
Note: This extension works for RT 4.4.1 on Ubuntu 14.04.3 LTS, tested 20161027.
 
==Source==
==Source==
This extension was originally posted on:
This extension was originally posted on:
*http://pleh.info/wiki/rt/rt-extension-queuechangeonupdate
*http://pleh.info/wiki/rt/rt-extension-queuechangeonupdate
==Link==
Link to the old .sh file
*http://www.gossamer-threads.com/lists/engine?do=post_attachment;postatt_id=4236;list=rt


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

Latest revision as of 14:51, 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.

Note: This extension works for RT 4.4.1 on Ubuntu 14.04.3 LTS, tested 20161027.

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

#!/bin/bash


# ---

# This script installs the Request Tracker plugin RT::Extension::QueueChangeOnUpdate

# ---


# RT installation path

rt_dir=/opt/rt4


# 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


# ---

# Create the directories, this is based on an RT installation in /opt/rt4

# ---


mkdir -p $rt_dir/$UpdateHTML_dir

mkdir -p $rt_dir/$Extension_dir


# ---

# Create the AfterWorked file

# ---


echo '<tr>

<td class="label">Queue:</td>

<td>

<& /Elements/SelectQueue,

Name => "Queue",

Default => $Ticket->QueueObj->Id,

InTable => 1,

&>

</td>

</tr>

<%ARGS>

$Ticket

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


# ---

# Create the perllocal.pod file

# ---


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


# ---

# Create the QueueChangeOnUpdate.pm file

# ---


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