<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AllowSuperUserToReassignTickets</id>
	<title>AllowSuperUserToReassignTickets - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AllowSuperUserToReassignTickets"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AllowSuperUserToReassignTickets&amp;action=history"/>
	<updated>2026-08-22T14:10:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=AllowSuperUserToReassignTickets&amp;diff=140&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AllowSuperUserToReassignTickets&amp;diff=140&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:14Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Shevek and I got a little annoyed when we found that a superuser could not reassign tickets arbitrarilly (one of the things I tend to to rather more often than I would like is to assign the ticket to the wrong person the first time around), so after much discussion with Jesse and some poking from Shevek, our copy of lib/RT/[[Ticket Local|Ticket_Local]].pm now contains:&lt;br /&gt;
&lt;br /&gt;
 use strict;&lt;br /&gt;
 use Hook::LexWrap;&lt;br /&gt;
 &lt;br /&gt;
 wrap &amp;#039;SetOwner&amp;#039;, pre =&amp;amp;gt; sub {&lt;br /&gt;
 $_[2] = &amp;#039;Force&amp;#039; if $_[0]-&amp;amp;gt;CurrentUserHasRight(&amp;#039;SuperUser&amp;#039;);&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 1;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
which should allow any [[SuperUser]] to reassign tickets arbitrarily. I have tested it after we restarted apache and it seems to be working fine. (we are currently using 3.2.)&lt;br /&gt;
&lt;br /&gt;
Zaniyah&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
This worked for us as advertised, but now when anyone attempts to use the &amp;quot;take&amp;quot; function of an unowned ticket we get the following error:&lt;br /&gt;
&lt;br /&gt;
 Modification of a read-only value attempted at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 5.&lt;br /&gt;
 &lt;br /&gt;
 Trace begun at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Exceptions.pm line 131 HTML::Mason::Exceptions::rethrow_exception(&amp;#039;Modification of a read-only value attempted at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 5.^J&amp;#039;) called at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 5&lt;br /&gt;
 RT::Ticket::__ANON__(&amp;#039;RT::Ticket=HASH(0xb1210f8)&amp;#039;, 26, &amp;#039;Take&amp;#039;, &amp;#039;ARRAY(0xb125d30)&amp;#039;) called at /usr/local/lib/perl5/site_perl/5.8.6/Hook/LexWrap.pm line 39&lt;br /&gt;
 Hook::LexWrap::__ANON__(&amp;#039;RT::Ticket=HASH(0xb1210f8)&amp;#039;, 26, &amp;#039;Take&amp;#039;) called at /usr/local/rt3/lib/RT/Ticket_Overlay.pm line 3030&lt;br /&gt;
 RT::Ticket::Take(&amp;#039;RT::Ticket=HASH(0xb1210f8)&amp;#039;) called at /usr/local/rt3/share/html/Ticket/Display.html line 122 HTML::Mason::Commands::__ANON__(&amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Component.pm line 136&lt;br /&gt;
 HTML::Mason::Component::run(&amp;#039;HTML::Mason::Component::FileBased=HASH(0xb0b4050)&amp;#039;, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1074 eval {...} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1068&lt;br /&gt;
 HTML::Mason::Request::comp(undef, undef, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 760&lt;br /&gt;
 HTML::Mason::Request::call_next(&amp;#039;HTML::Mason::Request::ApacheHandler=HASH(0xae8d704)&amp;#039;, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/rt3/share/html/autohandler line 215 HTML::Mason::Commands::__ANON__(&amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Component.pm line 136&lt;br /&gt;
 HTML::Mason::Component::run(&amp;#039;HTML::Mason::Component::FileBased=HASH(0xb092020)&amp;#039;, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1069 eval {...} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 1068&lt;br /&gt;
 HTML::Mason::Request::comp(undef, undef, undef, &amp;#039;Action&amp;#039;, &amp;#039;Take&amp;#039;, &amp;#039;id&amp;#039;, 7322) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 338&lt;br /&gt;
 eval {...} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 338 eval {...} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/Request.pm line 297&lt;br /&gt;
 HTML::Mason::Request::exec(&amp;#039;HTML::Mason::Request::ApacheHandler=HASH(0xae8d704)&amp;#039;) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/ApacheHandler.pm line 134&lt;br /&gt;
 eval {...} at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/ApacheHandler.pm line 134&lt;br /&gt;
 HTML::Mason::Request::ApacheHandler::exec(&amp;#039;HTML::Mason::Request::ApacheHandler=HASH(0xae8d704)&amp;#039;) called at /usr/local/lib/perl5/site_perl/5.8.6/HTML/Mason/ApacheHandler.pm line 827&lt;br /&gt;
 HTML::Mason::ApacheHandler::handle_request(&amp;#039;HTML::Mason::ApacheHandler=HASH(0xad88e14)&amp;#039;, &amp;#039;Apache=SCALAR(0xacf4638)&amp;#039;) called at /usr/local/rt3/bin/webmux.pl line 124&lt;br /&gt;
 eval {...} at /usr/local/rt3/bin/webmux.pl line 124 RT::Mason::handler(&amp;#039;Apache=SCALAR(0xacf4638)&amp;#039;) called at /dev/null line 0 eval {...} at /dev/null line 0&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Any thoughts? We&amp;#039;re on [[FreeBSD]] 5.4, using RT 3.4.2.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Try this:&lt;br /&gt;
&lt;br /&gt;
 use strict;&lt;br /&gt;
 use Hook::LexWrap;&lt;br /&gt;
 &lt;br /&gt;
 wrap &amp;#039;SetOwner&amp;#039;, pre =&amp;amp;gt; sub {&lt;br /&gt;
 my $Self = $_[2];&lt;br /&gt;
 my $Stuff = $_[0];&lt;br /&gt;
 if ( ( $Type ne &amp;#039;Take&amp;#039; ) and ( $Type ne &amp;#039;Steal&amp;#039; ) ) {&lt;br /&gt;
 if ( $Self-&amp;amp;gt;OwnerObj-&amp;amp;gt;Id ne $Self-&amp;amp;gt;CurrentUser-&amp;amp;gt;Id and $Self-&amp;amp;gt;CurrentUserHasRight(&amp;#039;SuperUser&amp;#039;)){&lt;br /&gt;
 $_[2] = &amp;#039;Force&amp;#039;&lt;br /&gt;
 }}}&lt;br /&gt;
 &lt;br /&gt;
 1;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Taan&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Taan,&lt;br /&gt;
&lt;br /&gt;
Thanks. We tried that, but unfortunately it didn&amp;#039;t work. Here is the error we got:&lt;br /&gt;
&lt;br /&gt;
 Number found where operator expected at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 12, near &amp;quot;1&amp;quot;&lt;br /&gt;
       (Missing semicolon on previous line?)&lt;br /&gt;
 [Thu Jan  4 11:01:21 2007] [error] Global symbol &amp;quot;$Type&amp;quot; requires explicit package name at /usr/local/rt3/local/lib/RT/Ticket_Local.pm&lt;br /&gt;
 line 7.\nGlobal symbol &amp;quot;$Type&amp;quot; requires explicit package name at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 7.\nsyntax error at&lt;br /&gt;
 /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 12, near &amp;quot;1&amp;quot;\nCompilation failed in require at (eval 238) line 3.\nCompilation failed&lt;br /&gt;
 in require at /usr/local/rt3/lib/RT/Tickets.pm line 73.\nBEGIN failed--compilation aborted at /usr/local/rt3/lib/RT/Tickets.pm line&lt;br /&gt;
 73.\nCompilation failed in require at /usr/local/rt3/lib/RT.pm line 305.\n&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
We played with putting semicolons in different positions, and successfully got rid of the semicolon error, but still had a problem with global symbol $Type errors.&lt;br /&gt;
&lt;br /&gt;
Do you have any more thoughts?&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Recent upgrade from 3.4.2 to 3.8.2 broke this. Now I get this in my logs:&lt;br /&gt;
&lt;br /&gt;
 Can&amp;#039;t modify constant item in scalar assignment at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 4, near &amp;quot;&amp;amp;amp;gt;&amp;quot;&lt;br /&gt;
 Bareword &amp;quot;pre&amp;quot; not allowed while &amp;quot;strict subs&amp;quot; in use at /usr/local/rt3/local/lib/RT/Ticket_Local.pm line 4.&lt;br /&gt;
 Compilation failed in require at (eval 1184) line 3.&lt;br /&gt;
 Compilation failed in require at /usr/local/rt3/lib/RT/Tickets.pm line 76.&lt;br /&gt;
 BEGIN failed--compilation aborted at /usr/local/rt3/lib/RT/Tickets.pm line 76.&lt;br /&gt;
 Compilation failed in require at /usr/local/rt3/lib/RT.pm line 423.&lt;br /&gt;
 [Thu Feb  5 11:59:38 2009] [warn] FastCGI: server &amp;quot;/usr/local/rt3/bin/mason_handler.fcgi&amp;quot; (pid 3631) terminated by calling exit with status &amp;#039;255&amp;#039;&lt;br /&gt;
 [Thu Feb  5 11:59:38 2009] [warn] FastCGI: server &amp;quot;/usr/local/rt3/bin/mason_handler.fcgi&amp;quot; restarted (pid 3654)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Any thoughts on how to fix this? Thank you.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Not a pretty/good soulution, but it works (3.8.7. on a Xubuntu Perl MYSQL Apache2)&lt;br /&gt;
&lt;br /&gt;
Edit [[Ticket Overlay|Ticket_Overlay]].pm in /your/rt/directory/lib/RT/&lt;br /&gt;
&lt;br /&gt;
FROM:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# If we&amp;#039;re not stealing and the ticket has an owner and it&amp;#039;s not&lt;br /&gt;
 # the current user&lt;br /&gt;
 if ( $Type ne &amp;#039;Steal&amp;#039; and $Type ne &amp;#039;Force&amp;#039;&lt;br /&gt;
      and $OldOwnerObj-&amp;amp;gt;Id != $RT::Nobody-&amp;amp;gt;Id&lt;br /&gt;
      and $OldOwnerObj-&amp;amp;gt;Id != $self-&amp;amp;gt;CurrentUser-&amp;amp;gt;Id)&lt;br /&gt;
 {&lt;br /&gt;
     $RT::Handle-&amp;amp;gt;Rollback();&lt;br /&gt;
     return ( 0, $self-&amp;amp;gt;loc(&amp;quot;You can only take tickets that are unowned&amp;quot;) )&lt;br /&gt;
         if $NewOwnerObj-&amp;amp;gt;id == $self-&amp;amp;gt;CurrentUser-&amp;amp;gt;id;&lt;br /&gt;
     return (&lt;br /&gt;
         0,&lt;br /&gt;
         $self-&amp;amp;gt;loc(&amp;quot;You can only reassign tickets that you own or that are unowned&amp;quot; )&lt;br /&gt;
     );&lt;br /&gt;
 }&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv TO:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# If we&amp;#039;re not stealing and the ticket has an owner and it&amp;#039;s not&lt;br /&gt;
 # the current user&lt;br /&gt;
 if ( $Type ne &amp;#039;Steal&amp;#039; and $Type ne &amp;#039;Force&amp;#039;&lt;br /&gt;
      and $OldOwnerObj-&amp;amp;gt;Id != $RT::Nobody-&amp;amp;gt;Id&lt;br /&gt;
      and $OldOwnerObj-&amp;amp;gt;Id != $self-&amp;amp;gt;CurrentUser-&amp;amp;gt;Id)&lt;br /&gt;
 {&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
unless ( $self-&amp;amp;gt;[[CurrentUserHasRight]](&amp;#039;[[SuperUser]]&amp;#039;) ) {&lt;br /&gt;
&lt;br /&gt;
     $RT::Handle-&amp;amp;gt;Rollback();&lt;br /&gt;
     return ( 0, $self-&amp;amp;gt;loc(&amp;quot;You can only take tickets that are unowned&amp;quot;) )&lt;br /&gt;
         if $NewOwnerObj-&amp;amp;gt;id == $self-&amp;amp;gt;CurrentUser-&amp;amp;gt;id;&lt;br /&gt;
     return (&lt;br /&gt;
         0,&lt;br /&gt;
         $self-&amp;amp;gt;loc(&amp;quot;You can only reassign tickets that you own or that are unowned&amp;quot; )&lt;br /&gt;
     );&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If anyone could, it would be a nice thing to make a patch/callback of this. [[DanielOT]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>