[rt-users] Sorting transactions by id instead of Created?
Hi, I'm wondering if there is any place in the code (anyone knows of) where database selects from the 'Transactions' table might be ordered by id instead of the Created date column? I'm trying to fix Create entries in the database by adding a new entry 1 second ahead then changing the initial Create to the Comment type. This is working fine, but in case there's a known place in the code where ordering is done by id, this will break idea. Lars RT Training Sessions (http://bestpractical.com/services/training.html) * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Barcelona, Spain November 28 29, 2011
Re: [rt-users] Limiting the information unprivileged users are able to see via the webinterface
Hello Joop, thanks a lot for this hint. This really saved my day. :) Actually, I finally achieved what I wanted to do with the following (in case someone else is looking for this): %init return if $session{'CurrentUser'}-Privileged; my $myskip=1; if ( $Transaction-Type =~ /^(Correspond|Create)$/ ) { $myskip = 0; } $$skip=$myskip; /%init %args $Transaction = undef $skip /%args This skips everything but Correspond and the initial Create message. Also thanks to Thomas about the return hint. Best regards, Lars Am 28.09.2011 17:08, schrieb Joop: Lars Braeuer wrote: Hello, is there a way in RT 4.x to reduce the information an unprivileged user can see when he's accessing his tickets via the RT webinterface? Yes, use Callbacks to skip the transactions you don't want. The Callback you want to add is: /opt/rt3/local/html/Callbacks/mococo/Ticket/Elements/ShowHistory/SkipTransaction with SkipTransaction having something like: %init my $myskip=0; if ( $Transaction-Type =~ /^(Set|Told)$/ ) { if ( $Transaction-Field =~ /^(TimeWorked|Told|Starts|Started|Due)$/ ) { $myskip = 1; } else { $myskip = 0; } } $$skip=$myskip; /%init %args $Transaction = undef $skip /%args Which skips the TimeWorked,Told,Starts,Started,Due transactions. You might want to consider modifying other files in SelfService to not show the user who worked on it but to show for example 'helpdesk'. Greetings, Joop RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 27, 2011 * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Melbourne VIC, Australia November 28 29, 2011 * Barcelona, Spain November 28 29, 2011 RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 27, 2011 * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Melbourne VIC, Australia November 28 29, 2011 * Barcelona, Spain November 28 29, 2011
[rt-users] Return from a local/html template to share/html template in case of special condition
Hi, is there a way to return from a local/html template to the original share/html template, in case a certain condition is met? (Please read on for more details). With the inspiration from Joop concerning 'conditions', I found out about the html templates in share/html/. I want to be able to show a reduced set of date lines in the Ticket/Elements/ShowDates template to unprivileged users. I successfully created rt-dir/local/html/Ticket/Elements/ShowDates with a reduced set of dates that is working for unprivileged users. Question: Is there a way to return to the original ShowDates template, in case $session{'CurrentUser'}-Privileged is true? See below for what is only working for unprivileged users for me (because the whole template seems to be exited in case this condition is met). table tr class=date created td class=label|/lCreated/:/td\ td class=value% $Ticket-CreatedObj-AsString %/td /tr tr class=date resolved td class=label|/lClosed/:/td\ td class=value% $Ticket-ResolvedObj-AsString %/td /tr % $m-callback( %ARGS, CallbackName = 'EndOfList', TicketObj = $Ticket ); /table %init # # This is not working: # return if $session{'CurrentUser'}-Privileged; /%init %ARGS $Ticket = undef $UpdatedLink = 1 /%ARGS Thanks in advance. Best regards, Lars RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 27, 2011 * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Melbourne VIC, Australia November 28 29, 2011 * Barcelona, Spain November 28 29, 2011
[rt-users] Limiting the information unprivileged users are able to see via the webinterface
Hello, is there a way in RT 4.x to reduce the information an unprivileged user can see when he's accessing his tickets via the RT webinterface? The only information I want the user to see are the replies concerning his tickets and no other information like the change of owner, addition or removal of AdminCC user, etc. I couldn't find an appropriate setting or right to reduce the output. Best regards, Lars RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 27, 2011 * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Melbourne VIC, Australia November 28 29, 2011 * Barcelona, Spain November 28 29, 2011
[rt-users] Bug or feature? Unpriviledged users see first article via webinterface
Hi, I was wondering if it is possible to allow a priviledged user to start a ticket as type comment instead type reply. We are using 4.0.0 and I haven't seen anything like this in the changelog of 4.0.{1,2}. We have the following problem: Sometimes we open a new ticket (i.e. New ticket in ... button) *without* a Requestor on the ticket, we then usually write an internal starting comment as ticket kick off. This text which we want to be an internal comment is internally saved by RT as type Reply. So if we later on add a Requestor to the ticket and give that requestor unpriviledged access to the RT webinterface, he will be able to see the initial text which was supposed to be an internal comment. So limiting the initial ticket opening process to the reply type seems to be somewhat inflexible. Having the ability to pick in between comment and reply when opening a new ticket via the webinterface would be very, very helpful. Until now we always create new tickets just with the text Ticket creation, and then add a comment. But this is very annoying. Is there just an option/right I have missed to set correctly? Regards, Lars RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 27, 2011 * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Melbourne VIC, Australia November 28 29, 2011 * Barcelona, Spain November 28 29, 2011
[rt-users] Add custom field to default search query
Hello, the default search form on every page only allows to search through standard fields, but not through custom fields. Is there any way, like hacking an (sql) query, to include just one custom field with the standard search? I.e. we are tracking the customer ID in one of these fields. We would like to include it in the standard search, without having to use the advanced search feature, which takes time. It's also not applicable to setup saved searches, as we want to remain totally dynamic. Any hints? Thanks in advance. Best regards, Lars Braeuer RT Training Sessions (http://bestpractical.com/services/training.html) * Chicago, IL, USA September 26 27, 2011 * San Francisco, CA, USA October 18 19, 2011 * Washington DC, USA October 31 November 1, 2011 * Melbourne VIC, Australia November 28 29, 2011 * Barcelona, Spain November 28 29, 2011
[rt-users] 4.0.0 Minor layout bug
Hi, I discovered a minor layout bug in 4.0.0. When using a custom logo and even though having LogoImageWidth and LogoImageHeight set in the config, the logo will be scaled to the full height of the top bar. This is annoying, if the logo is smaller than the bar. This is because of a css setting in layout.css: --- share/html/NoAuth/css/aileron//layout.css.org 2011-05-05 21:58:55.0 +0200 +++ share/html/NoAuth/css/aileron/layout.css2011-05-05 21:58:15.0 +0200 @@ -117,7 +117,7 @@ div#logo a img { border: 0; -height: 100% !important; +height: auto !important; width: auto !important; float: right; } This fixes the problem. Best regards, Lars Bräuer -- MPeX.net GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany MPeXnetworks / www.mpexnetworks.de Tel: ++49-30-78097 180 / Fax: ++49-30-78097 181 Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 76688 Geschäftsführer: Lars Bräuer, Gregor Lawatscheck
[rt-users] Searching for AdminCc
Hello, first of all, thanks for this great piece of software. We are using RT for quite a while now. We are currently testing RT 4.0.0 and were wondering, if there is a work around for what we are doing, without actually having to modify the code. We have a saved search that allows us to display all tickets on the dashboard, that are not owned by the user running the search, but all tickets that a user is AdminCc on. In order to achieve this, I changed the code to use __CurrentUserEmail__ in the search: --- lib/RT/Tickets_SQL.pm.orig 2011-05-02 21:47:49.0 +0200 +++ lib/RT/Tickets_SQL.pm 2011-05-04 16:15:00.0 +0200 @@ -202,6 +202,8 @@ # replace __CurrentUser__ with id $value = $self-CurrentUser-id if $value eq '__CurrentUser__'; +# replace __CurrentUserEmail__ with EmailAddress +$value = $self-CurrentUser-EmailAddress if $value eq '__CurrentUserEmail__'; unless( $dispatch{ $class } ) { die No dispatch method for class '$class' The query of the saved search is: Owner != 'Nobody' AND Status != 'resolved' AND Status != 'rejected' AND Status != 'stalled' AND Owner != '__CurrentUser__' AND AdminCc.EmailAddress LIKE '__CurrentUserEmail__' This is working fine for us, but it's really annoying to carry on the change through all releases. Is there another easy way to achieve what we are trying to do, or could you consider to add this patch upstream? Best regards, Lars Bräuer
Re: [rt-users] Searching for AdminCc
Hi Thomas, thanks a lot. That's it and it's so obvious, I should have stumbled accross it when setting up the query. Thanks again. Lars Am 04.05.2011 18:05, schrieb Thomas Sibley: On 05/04/2011 11:00 AM, Lars Braeuer wrote: The query of the saved search is: Owner != 'Nobody' AND Status != 'resolved' AND Status != 'rejected' AND Status != 'stalled' AND Owner != '__CurrentUser__' AND AdminCc.EmailAddress LIKE '__CurrentUserEmail__' This is working fine for us, but it's really annoying to carry on the change through all releases. Is there another easy way to achieve what we are trying to do, or could you consider to add this patch upstream? Your change isn't necessary. Just use AdminCc.id = '__CurrentUser__' instead (that's been supported for a long time). Thomas
[rt-users] Change FriendlyFromLineFormat to include name of responder instead of queue name
Hello, here's another fix we implemented, in order to change the friendly from line format. I'd be interessted, if there is a better solution for that? In RT_SiteConfig.pm we have: Set($FriendlyFromLineFormat , \My Company %s\ %s); When sending a mail from queue Incidents this results in the from line: 'My Company Incidents queue-mail-address' Instead of the queue name we would like to replace the first %s with the name of the person answering the request, resulting in 'My Company John Doe queue-mail-address'. Until now we are using another patch for that: --- lib/RT/Action/Autoreply.pm.orig 2011-05-02 21:47:49.0 +0200 +++ lib/RT/Action/Autoreply.pm 2011-05-04 17:08:48.0 +0200 @@ -97,7 +97,7 @@ my $friendly_name; if (RT-Config-Get('UseFriendlyFromLine')) { - $friendly_name = $self-TicketObj-QueueObj-Description || + $friendly_name = $self-TransactionObj-CreatorObj-RealName || $self-TicketObj-QueueObj-Name; } Is there an easier way to achieve this without patching the code? If not, could you introduce a new variable like $FriendlyFromLineName to enable user to pick which variable to use out of a few selected ones? Best regards, Lars
Re: [rt-users] HTTP/HTTPS bug in 4.0?
Hi, are you talking about the More about the requestors section when viewing a ticket? Our RT 4.0.0 test instance runs on https, but all the links (i.e. 10 most important active tickets) are https, just as expected. Lars Am 04.05.2011 23:06, schrieb Stoned Elipot: Hi, On Wed, May 4, 2011 at 9:49 PM, Alex Vandiver ale...@bestpractical.com wrote: On Wed, 2011-05-04 at 14:27 -0500, Dario Landazuri wrote: We are running an RT instance under https only. I just noticed a small issue - when you're looking at a ticket, the links for a requestor's other tickets are non-https (http://...). On our system, that leads to a 404. Other links in the ticket (creating links, last ticket transaction, etc) all properly go to https://... This does look to be a bug; I'll bounce your mail into the issues.bestpractical.com to track it. - Alex Playing around with a 4.0.0 test clone of a 3.8.10 RT instance I noticed the same thing, both for the requestor's other tickets links and for the related tickets links. Then I noticed that the 3.8.10 instance also exhibits the same behaviour, only it was masqueraded by the web server doing HTTP to HTTPS redirection :-} Cheers, Stoned.
[rt-users] Weird error on Owner Change: Could not change owner. Group already has member
Hi, I'm using RT 3.6.6, having three Groups defined. The group I'm in, has all rights granted on the global level. But still I'm not able to take some of the tickets currently owned by Nobody. Whenever I try to change the owner of some tickets (using the Basics section in the ticket view), I'm getting the error message: Could not change owner. Group already has member I tried to debug this issue. So I found out that the first part of the error message is originated from lib/RT/Ticket_Overlay.pm line 3079: my ( $add_id, $add_msg ) = $self-OwnerGroup-_AddMember( PrincipalId = $NewOwnerObj-PrincipalId, InsideTransaction = 1 ); unless ($add_id) { $RT::Handle-Rollback(); return ( 0, $self-loc(Could not change owner. ) . $add_msg ); } Digging further down, I was wondering why the AddMember function is used at all? The second part of the error Group already has member is originated from lib/RT/Group_Overlay.pm line 985: if ( $self-HasMember( $new_member_obj ) ) { #User is already a member of this group. no need to add it return ( 0, $self-loc(Group already has member) ); } Why would it be required, to add the user to a group, when I'm just trying to change the owner of the ticket? Commenting out the block in Ticket_Overlay.pm starting with unless ($add_id) { fixes the issue, but I'm not sure if this is breaking anything. Thanks in advance for any advice. Best, Lars Bräuer -- MPeX.net GmbH MPeXnetworks Werner-Voß-Damm 62http://mpexnetworks.de D-12101 Berlin Tel: ++49 - 30 - 780 97 180 Germany Fax: ++49 - 30 - 780 97 181 HRB 76688, Berlin Amtsgericht Charlottenburg Geschäftsführer: Gregor Lawatscheck Robert Lawatscheck Lars Bräuer ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com