Custom condition problem

Hello all,

I’m trying to implement MuteResolve
(http://wiki.bestpractical.com/view/MuteResolve) in my RT-3.8.4
installation but it doesn’t work for me.
Finally I cut my script just to:
{code}
return 0 unless ($self->TransactionObj->Type eq “Status” &&
$self->TransactionObj->NewValue eq “resolved”);

return 1;
{code}

When changing status of the ticket to open I don’t see any errors. But
if I resolve the ticket I always get this error in logs:
Sep 15 00:17:38 rt RT: Couldn’t load object RT::Transaction #0
(/var/www/rt.iptp.net/bin/…/lib/RT/Interface/Web.pm:1127)

What I’m doing wrong?

Condition: User Defined
Action: Notify Requestors
Template: Global template: Resolved
Stage: TransactionBatch

Regards,
Sergey Kozhedub

Hi,

As far as I can see error is not related to the scrip. Error happens in
Web.pm.15.09.2010 2:50 пользователь “Sergey Kozhedub” sevk@maks.net написал:

Hello all,

I’m trying to implement MuteResolve (
http://wiki.bestpractical.com/view/MuteResolve) in my RT-3.8.4 installation
but it doesn’t work for me.
Finally I cut my script just to:
{code}
return 0 unless ($self->TransactionObj->Type eq “Status” &&
$self->TransactionObj->NewValue eq “resolved”);

return 1;
{code}

When changing status of the ticket to open I don’t see any errors. But if I
resolve the ticket I always get this error in logs:
Sep 15 00:17:38 rt RT: Couldn’t load object RT::Transaction #0 (/var/www/
rt.iptp.net/bin/../lib/RT/Interface/Web.pm:1127)

What I’m doing wrong?

Condition: User Defined
Action: Notify Requestors
Template: Global template: Resolved
Stage: TransactionBatch

Regards,
Sergey Kozhedub

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!

Hi Ruslan,

This error occurs in ProcessObjectCustomFieldUpdates subroutine in Web.pm

The code is:
foreach my $id ( keys %{$custom_fields_to_mod{$class}} ) {

         my $Object = $args{'Object'}; 


         $Object = $class->new( $session{'CurrentUser'} ) 


             unless $Object && ref $Object eq $class; 





         $Object->Load( $id ) unless ($Object->id || 0) == $id; 


         unless ( $Object->id ) { 


             $RT::Logger->warning("Couldn't load object $class 

#$id");

             next; 


         } 

But I’m not familiar with RT internals to check it…

Regards,
Sergey KozhedubOn 09/15/2010 08:22 PM, Ruslan Zakirov wrote:

Hi,

As far as I can see error is not related to the scrip. Error happens in
Web.pm.

15.09.2010 2:50 пользователь “Sergey Kozhedub” <sevk@maks.net
mailto:sevk@maks.net> написал:

Hello all,

I’m trying to implement MuteResolve
(http://wiki.bestpractical.com/view/MuteResolve) in my RT-3.8.4
installation but it doesn’t work for me.
Finally I cut my script just to:
{code}
return 0 unless ($self->TransactionObj->Type eq “Status” &&
$self->TransactionObj->NewValue eq “resolved”);

return 1;
{code}

When changing status of the ticket to open I don’t see any errors. But
if I resolve the ticket I always get this error in logs:
Sep 15 00:17:38 rt RT: Couldn’t load object RT::Transaction #0
(/var/www/rt.iptp.net/bin/…/lib/RT/Interface/Web.pm:1127
http://rt.iptp.net/bin/../lib/RT/Interface/Web.pm:1127)

What I’m doing wrong?

Condition: User Defined
Action: Notify Requestors
Template: Global template: Resolved
Stage: TransactionBatch

Regards,
Sergey Kozhedub

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!

Hi.

MuteResolve uses transaction custom fields which are kinda new in RT. Either
it’s a bug in 3.8.4 or permissions related bug. You should try it on 3.8.8.

Hi Ruslan,

This error occurs in ProcessObjectCustomFieldUpdates subroutine in Web.pm

The code is:
foreach my $id ( keys %{$custom_fields_to_mod{$class}} ) {

       my $Object = $args{'Object'};

       $Object = $class->new( $session{'CurrentUser'} )

           unless $Object && ref $Object eq $class;




       $Object->Load( $id ) unless ($Object->id || 0) == $id;

       unless ( $Object->id ) {

           $RT::Logger->warning("Couldn't load object $class #$id");
           next;

       }

But I’m not familiar with RT internals to check it…

Regards,
Sergey KozhedubOn 09/15/2010 08:22 PM, Ruslan Zakirov wrote:

Hi,

As far as I can see error is not related to the scrip. Error happens in
Web.pm.

15.09.2010 2:50 пользователь “Sergey Kozhedub” <sevk@maks.net
mailto:sevk@maks.net> написал:

Hello all,

I’m trying to implement MuteResolve
(http://wiki.bestpractical.com/view/M
http://rt.iptp.net/bin/../lib/RT/Interface/Web.pm:1127)

What I’m doing wrong?

Condition: User Defined
Action: Notify Requestors
Template:…

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the m…

I’m testing this from user with SuperUser rights so this should not be
permissions related.

I’ll try to upgrade in the near future but have another idea:

Is it possible to distinguish between 2 resolve modes in custom condition?
One is when you click “resolve” in the ticket display
(https://rt/Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=xxx)
and another when resolving from “Basics”
(https://rt/Ticket/Modify.html?id=xxx)

If yes I can use one of the modes as “mute”.

Thanks.

Regards,
Sergey KozhedubOn 09/16/2010 09:32 PM, Ruslan Zakirov wrote:

Hi.

MuteResolve uses transaction custom fields which are kinda new in RT.
Either it’s a bug in 3.8.4 or permissions related bug. You should try it
on 3.8.8.

16.09.2010 11:36 пользователь “Sergey Kozhedub” <sevk@maks.net
mailto:sevk@maks.net> написал:

Hi Ruslan,

This error occurs in ProcessObjectCustomFieldUpdates subroutine in Web.pm

The code is:
foreach my $id ( keys %{$custom_fields_to_mod{$class}} ) {

       my $Object = $args{'Object'};

       $Object = $class->new( $session{'CurrentUser'} )

           unless $Object && ref $Object eq $class;




       $Object->Load( $id ) unless ($Object->id || 0) == $id;

       unless ( $Object->id ) {

           $RT::Logger->warning("Couldn't load object $class #$id");
           next;

       }

But I’m not familiar with RT internals to check it…

Regards,
Sergey Kozhedub

On 09/15/2010 08:22 PM, Ruslan Zakirov wrote:

>
> Hi,
>
> As far as I can see error is not related to the scrip. Error
happens in
> Web.pm.
>

    >> 15.09.2010 2:50 пользователь "Sergey Kozhedub"
    <sevk@maks.net <mailto:sevk@maks.net>

    <mailto:sevk@maks.net <mailto:sevk@maks.net>>> написал:


    >>
    >> Hello all,
    >>
    >> I'm trying to implement MuteResolve
    >> (http://wiki.bestpractical.com/view/M...

    <http://rt.iptp.net/bin/../lib/RT/Interface/Web.pm:1127>)


    >>
    >> What I'm doing wrong?
    >>
    >> Condition: User Defined
    >> Action: Notify Requestors
    >> Template:...

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the m…

I’m testing this as user with SuperUser rights so this should not be
permissions related.

I’ll try to upgrade in the near future but have another idea:

Is it possible to distinguish between 2 resolve modes in custom condition?
One is when you click “resolve” in the ticket display
(https://rt/Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=xxx)
and another when resolving from “Basics”
(https://rt/Ticket/Modify.html?id=xxx)

If yes I can use one of the modes as “mute”.

Thanks.

Regards,
Sergey KozhedubOn 09/16/2010 09:32 PM, Ruslan Zakirov wrote:

Hi.

MuteResolve uses transaction custom fields which are kinda new in RT.
Either it’s a bug in 3.8.4 or permissions related bug. You should try it
on 3.8.8.

16.09.2010 11:36 пользователь “Sergey Kozhedub” <sevk@maks.net
mailto:sevk@maks.net> написал:

Hi Ruslan,

This error occurs in ProcessObjectCustomFieldUpdates subroutine in Web.pm

The code is:
foreach my $id ( keys %{$custom_fields_to_mod{$class}} ) {

       my $Object = $args{'Object'};

       $Object = $class->new( $session{'CurrentUser'} )

           unless $Object && ref $Object eq $class;




       $Object->Load( $id ) unless ($Object->id || 0) == $id;

       unless ( $Object->id ) {

           $RT::Logger->warning("Couldn't load object $class #$id");
           next;

       }

But I’m not familiar with RT internals to check it…

Regards,
Sergey Kozhedub

On 09/15/2010 08:22 PM, Ruslan Zakirov wrote:

>
> Hi,
>
> As far as I can see error is not related to the scrip. Error
happens in
> Web.pm.
>

    >> 15.09.2010 2:50 пользователь "Sergey Kozhedub"
    <sevk@maks.net <mailto:sevk@maks.net>

    <mailto:sevk@maks.net <mailto:sevk@maks.net>>> написал:


    >>
    >> Hello all,
    >>
    >> I'm trying to implement MuteResolve
    >> (http://wiki.bestpractical.com/view/M...

    <http://rt.iptp.net/bin/../lib/RT/Interface/Web.pm:1127>)


    >>
    >> What I'm doing wrong?
    >>
    >> Condition: User Defined
    >> Action: Notify Requestors
    >> Template:...

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the m…