Re: [rt-users] Critical error after upgrading to RT 4.4.0

2016-06-01 Thread Shawn Moore
Hi Cris,

On 2016年6月1日 at 5:58:31, Guadagnino Cristiano (guadagnino.cristi...@creval.it) 
wrote:
> Yesterday I upgraded from RT 4.2.12 to RT 4.4.0.
>  
> Today I am sometimes getting errors like this:
>  
> [30091] [Wed Jun 1 09:13:03 2016] [critical]: Couldn't create ticket groups 
> for ticket  
> 133221. aborting Ticket creation. (/opt/rt4/sbin/../lib/RT/Ticket.pm:444)
>  
> [30091] [Wed Jun 1 09:13:03 2016] [crit]: Ticket creation failed: I: AGG 
> MAGGIO 2016.xlsx:  
> Ticket could not be created due to an internal error 
> (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:  
> 697)

This is the first we’ve seen of this error. :/ If you can send over a stack 
trace that will help track it down. Adding this to your site config will do so:

Set($LogStackTraces, “error");

> I am having difficulty understanding where the problem is (what's the meaning 
> of "ticket  
> groups"?) and hence how to solve it.

Ticket groups are the groups that contain AdminCcs, Ccs, Requestors, etc.

> Please help!!!

Do you have any customizations? Which extensions are installed? And which 
database are you on?

> Cris

Best of luck,
Shawn
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Alternative GUIs for RT?

2016-06-01 Thread Christian Loos
Am 01.06.2016 um 11:53 schrieb Vegard Vesterheim:
> I tried to register a new User Custom Field, naming the Field
> 'PreferEditDisplay', and allowing two values for the field: 'Edit' or
> 'Display'. I have registered the value 'Edit' for a specific user for
> this Custom Field, but I am not able to extract the value
> programmatically. I expected the following code to work, but I get no
> values back.
> 
> my $UserObj = RT::User->new( $session{'CurrentUser'} );
> my $cf_values = $UserObj->CustomFieldValues('PreferEditDisplay');


You can easily add custom user preferences.
Have a look here:
https://github.com/tbrumm/RT-Extension-SideBySideView/blob/master/lib/RT/Extension/SideBySideView.pm#L9-L17

This new preference is used here:
https://github.com/tbrumm/RT-Extension-SideBySideView/blob/master/html/Callbacks/SideBySideView/Ticket/Display.html/BeforeShowSummary#L15

Chris
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Alternative GUIs for RT?

2016-06-01 Thread Emmanuel Lacour
Le 01/06/2016 13:13, Vegard Vesterheim a écrit :
> 
> 
> I found a solution, I think the problem was related to loading the
> correct User Object.
> 

indeed, I misread you're code :(

> The following works:
> 
> my $UserObj = $session{'CurrentUser'}->UserObj;
> my $cf_value = $UserObj->FirstCustomFieldValue('PreferEditDisplay');
> 
> I would have thought that
>   RT::User->new($session{'CurrentUser'})
> and
>   $session{'CurrentUser'}->UserObj
> 
> would be equivalent, but apparently not.
> 

no, either:


my $UserObj = RT::User->new($session{'CurrentUser'});
$UserObj->Load(a user name);

or in your case, just $session{'CurrentUser'}->UserObj

> Thanks for the hint.
> 

you're welcome

-- 
Easter-eggs  Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37-   Fax: +33 (0) 1 43 35 00 76
mailto:elac...@easter-eggs.com  -   http://www.easter-eggs.com
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Alternative GUIs for RT?

2016-06-01 Thread Vegard Vesterheim
On Wed, 1 Jun 2016 12:01:10 +0200 Emmanuel Lacour  
wrote:

> Le 01/06/2016 11:53, Vegard Vesterheim a écrit :
>> 
>> 
>> I tried to register a new User Custom Field, naming the Field
>> 'PreferEditDisplay', and allowing two values for the field: 'Edit' or
>> 'Display'. I have registered the value 'Edit' for a specific user for
>> this Custom Field, but I am not able to extract the value
>> programmatically. I expected the following code to work, but I get no
>> values back.
>> 
>> my $UserObj = RT::User->new( $session{'CurrentUser'} );
>> my $cf_values = $UserObj->CustomFieldValues('PreferEditDisplay');
>> 
>
> You just wan't:
>
> my $cf_value = $UserObj->FirstCustomFieldValue('PreferEditDisplay');
>
> I think.

Yes, but I had tried that as well, same result.

I found a solution, I think the problem was related to loading the
correct User Object.

The following works:

my $UserObj = $session{'CurrentUser'}->UserObj;
my $cf_value = $UserObj->FirstCustomFieldValue('PreferEditDisplay');

I would have thought that
  RT::User->new($session{'CurrentUser'})
and
  $session{'CurrentUser'}->UserObj

would be equivalent, but apparently not.

Thanks for the hint.

-- 
- Vegard V -
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Alternative GUIs for RT?

2016-06-01 Thread Emmanuel Lacour
Le 01/06/2016 11:53, Vegard Vesterheim a écrit :
> 
> 
> I tried to register a new User Custom Field, naming the Field
> 'PreferEditDisplay', and allowing two values for the field: 'Edit' or
> 'Display'. I have registered the value 'Edit' for a specific user for
> this Custom Field, but I am not able to extract the value
> programmatically. I expected the following code to work, but I get no
> values back.
> 
> my $UserObj = RT::User->new( $session{'CurrentUser'} );
> my $cf_values = $UserObj->CustomFieldValues('PreferEditDisplay');
> 

You just wan't:

my $cf_value = $UserObj->FirstCustomFieldValue('PreferEditDisplay');

I think.


-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Alternative GUIs for RT?

2016-06-01 Thread Vegard Vesterheim
On Thu, 10 Mar 2016 14:36:12 +0100 Vegard Vesterheim 
 wrote:

> Some of our users find the RT web gui complex, and also ineffective for
> some use-cases. I have been tasked to investigate alternative GUIs
> for RT.
>
> The "criticism" relates to the fact that some fields are irrelevant for
> some users and should be possible to suppress, and also that the default
> ticket display does not allow editing the fields directly. We are
> considering creating a new ticket display page which combines the
> contents from Basics (Ticket/Modify.html) and History
> (Ticket/History.html). This is fairly easy to implement, I guess.

We have now implemented a variant of the Jumbo edit page, calling it
./local/html/Ticket/Edit.html. The idea is to allow this page to be used
as the default ticket display page (instead of Ticket/Display.html).

The user can now edit the ticket directly, having access to the ticket
history in the same page. We need to test this functionality a bit more,
but I wonder if something like this could be considered for inclusion
into RT.

> Maybe one could even add a user preference for default ticket display
> page.

I tried to register a new User Custom Field, naming the Field
'PreferEditDisplay', and allowing two values for the field: 'Edit' or
'Display'. I have registered the value 'Edit' for a specific user for
this Custom Field, but I am not able to extract the value
programmatically. I expected the following code to work, but I get no
values back.

my $UserObj = RT::User->new( $session{'CurrentUser'} );
my $cf_values = $UserObj->CustomFieldValues('PreferEditDisplay');

I tried to enable DBI tracing, expecting to observe some relevant
SELECT-statements from the objectcustomfieldvalues table, but there are
none.

rt4=> select content, disabled from objectcustomfieldvalues where 
customfield=(select id from customfields where name='PreferEditDisplay');
 content | disabled 
-+--
 Edit|1
 Display |1
 Edit|0


Any hints on how to extract custom field values for a specific custom
field, and a specific User object?

-- 
- Vegard V -
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Critical error after upgrading to RT 4.4.0

2016-06-01 Thread Guadagnino Cristiano
Yesterday I upgraded from RT 4.2.12 to RT 4.4.0.



Today I am sometimes getting errors like this:



[30091] [Wed Jun  1 09:13:03 2016] [critical]: Couldn't create ticket groups 
for ticket 133221. aborting Ticket creation. 
(/opt/rt4/sbin/../lib/RT/Ticket.pm:444)

[30091] [Wed Jun  1 09:13:03 2016] [crit]: Ticket creation failed: I: AGG 
MAGGIO 2016.xlsx: Ticket could not be created due to an internal error 
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:
697)

I am having difficulty understanding where the problem is (what's the meaning 
of "ticket groups"?) and hence how to solve it.



Please help!!!



Cris


-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] Slow quote folding

2016-06-01 Thread Petr Hanousek
Dear all,
we have here some users who have such a habit to keep all the
conversation history in e-mails. Some of them have also stupid mail
clients which doubles the number of spaces. This results in looong mails
and therefore long ticket history. So some individuals use, for better
information overview, quote folding.
This works quite well, but when the stuff that is to be quoted in ticket
is too long (or too many of them?), the quoting procedure takes very
long time. I've got here a ticket with 24 replies, each with the full
mail history, and showing the ticket with folding turned on takes about
8 minutes. The ticket history during that time shows only "Loading..."
notice.

When I searched in the code to see how this folding is done, it gave me
an impression that it uses some general method which affects the whole
RT. So I am little bit scare to give it some tuning :) Could you someone
please either to confirm a bug, or (if it is a feature) explain me the
mechanism how this should work and what to tune/rewrite?

Thank you, Petr

-- 
+---+
   Petr Hanousek   e-mail: petr.hanou...@cesnet.cz
   MetaCentrum User Supportphone: +420 950 072 112
   CESNET z.s.p.o. mobile: +420 606 665 139
   location: Zikova 13a, Praha room: 32b
Czech Republic
+---+
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016