https://rt-wiki.bestpractical.com/index.php?title=AddAdminCcAndChangeQueue&feed=atom&action=historyAddAdminCcAndChangeQueue - Revision history2024-03-29T15:31:54ZRevision history for this page on the wikiMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=AddAdminCcAndChangeQueue&diff=26348&oldid=prevTharn at 00:50, 14 August 20162016-08-14T00:50:14Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:50, 13 August 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On a queue with several admin[[CCs]] there was one slightly different task that needed to included one other person. Rather than create a second queue with its own list of Admin CC's and require everyone to watch two queues we made a second queue and added this script to move the tickets to the main queue. The web form for the special jobs routes them to the special queue, where the script adds the adminCC and changes the assigned queue to the main queue.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On a queue with several admin[[CCs]] there was one slightly different task that needed to included one other person. Rather than create a second queue with its own list of Admin CC's and require everyone to watch two queues we made a second queue and added this script to move the tickets to the main queue. The web form for the special jobs routes them to the special queue, where the script adds the adminCC and changes the assigned queue to the main queue.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <<del style="font-weight: bold; text-decoration: none;">nowiki</del>>Description: AddAdminCC and change queue</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <<ins style="font-weight: bold; text-decoration: none;">pre</ins>></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> </ins>Description: AddAdminCC and change queue</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Condition: On Create</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Condition: On Create</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Action: User Defined</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> Action: User Defined</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l29">Line 29:</td>
<td colspan="2" class="diff-lineno">Line 30:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return 1;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return 1;</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del></<del style="font-weight: bold; text-decoration: none;">nowiki</del>></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></<ins style="font-weight: bold; text-decoration: none;">pre</ins>></div></td></tr>
</table>Tharnhttps://rt-wiki.bestpractical.com/index.php?title=AddAdminCcAndChangeQueue&diff=34&oldid=prevAdmin: 2 revisions imported2016-04-06T20:03:11Z<p>2 revisions imported</p>
<p><b>New page</b></p><div>On a queue with several admin[[CCs]] there was one slightly different task that needed to included one other person. Rather than create a second queue with its own list of Admin CC's and require everyone to watch two queues we made a second queue and added this script to move the tickets to the main queue. The web form for the special jobs routes them to the special queue, where the script adds the adminCC and changes the assigned queue to the main queue.<br />
<br />
<nowiki>Description: AddAdminCC and change queue<br />
Condition: On Create<br />
Action: User Defined<br />
Template: Global Template: Admin Comment<br />
Stage: Transaction Create<br />
Custom Action Prep Code:<br />
<br />
return 1;<br />
<br />
Custom Action Cleanup Code:<br />
<br />
# add adminCC<br />
my $admincclist = $self-&gt;TicketObj-&gt;AdminCc;<br />
my $user = RT::User-&gt;new($RT::SystemUser);<br />
$user-&gt;LoadByEmail('somebody@somewhere.com');<br />
$admincclist-&gt;AddMember($user-&gt;Id);<br />
<br />
# Change queue<br />
my $newqueue = "some_queue_number";<br />
my $T_Obj = $self-&gt;TicketObj;<br />
<br />
$RT::Logger-&gt;info("Auto assign ticket #". $T_Obj-&gt;id ." to queue #". $newqueue );<br />
my ($status, $msg) = $T_Obj-&gt;SetQueue($newqueue);<br />
unless ($status) {<br />
$RT::Logger-&gt;warning("unable to set new queue: $msg");<br />
return undef;<br />
}<br />
return 1;<br />
</nowiki></div>Admin