[rt-users] PATH: shredder deletes users with valid messages

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Jul 23 18:58:49 EDT 2009


See comments in the ticket you created.

On Fri, Jul 24, 2009 at 12:33 AM, Jo Rhett<jrhett at netconsonance.com> wrote:
> This patch was cribbed from somewhere else and improved, but it's
> still not integrated into 3.8.4.    Can we get this into 3.8.5 please?
>
> --- lib/RT/Shredder/Plugin/Users.pm_orig        2009-07-23
> 13:29:58.000000000 -0700
> +++ lib/RT/Shredder/Plugin/Users.pm     2009-07-23 13:31:26.000000000
> -0700
> @@ -165,7 +165,7 @@
>                  );
>      }
>
> -    if( $self->{'opt'}{'no_tickets'} ) {
> +    if( exists( $self->{'opt'}{'no_tickets'} ) ) {
>          return $self->FilterWithoutTickets(
>              Shredder => $args{'Shredder'},
>              Objects  => $objs,
> @@ -219,7 +219,8 @@
>  sub _WithoutTickets {
>      my ($self, $user) = @_;
>      my $tickets = RT::Tickets->new( $RT::SystemUser );
> -    $tickets->FromSQL( 'Watcher.id = '. $user->id );
> +    $tickets->{'allow_deleted_search'} = 1;
> +    $tickets->FromSQL( 'Watcher.id = '. $user->id . ' OR Creator.id =
> '. $user->id );
>      # HACK: we may use Count method which counts all records
>      # that match condtion, but we really want to know only that
>      # at least one record exist, so we fetch first row only
>
> --
> Jo Rhett
> Net Consonance : consonant endings by net philanthropy, open source
> and other randomness
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list