How to delete user

Guys, I just sent an email to my RT, and a user was creaed and the
ticket entered… now I was wondering, I want to delete the created
user… how can I do that?

Thx!

Anton Krall
Intruder Consulting

email: HYPERLINK "mailto:akrall@intruder.com.mx"akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

|+ Guys, I just sent an email to my RT, and a user was creaed and the
|+ ticket entered… now I was wondering, I want to delete the created
|+ user… how can I do that?

You can’t, per-say delete a user, but you can mark them inactive.

Well, you can delete a user, if you go do some database-foo. Just make
sure any tickets that user is associated with, are updated as well.

-darrin

Hmmm if its not support internally, Id rather leave it like that…
Anyway, users is not listed if the access RT flag is off so… No problem
there right?

Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450-----Original Message-----
From: Darrin Walton [mailto:darrinw@nixc.net]
Sent: Miércoles, 03 de Julio de 2002 08:44 p.m.
To: Anton Krall
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] how to delete user

|+ Guys, I just sent an email to my RT, and a user was creaed and the
|+ ticket entered… now I was wondering, I want to delete the created
|+ user… how can I do that?

You can’t, per-say delete a user, but you can mark them inactive.

Well, you can delete a user, if you go do some database-foo. Just make
sure any tickets that user is associated with, are updated as well.

-darrin

Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

|+ Hmmm if its not support internally, Id rather leave it like that…
|+ Anyway, users is not listed if the access RT flag is off so… No problem
|+ there right?

Right. Besides, RT does not email users a password, so they couldn’t log
in anyway. It is just the current way RT keeps track of who has opened
tickets in the past.

-darrin

Sounds good to me…

Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450-----Original Message-----
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com] On Behalf Of Darrin Walton
Sent: Miércoles, 03 de Julio de 2002 08:49 p.m.
To: Anton Krall
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] how to delete user

|+ Hmmm if its not support internally, Id rather leave it like that…
|+ Anyway, users is not listed if the access RT flag is off so… No
problem
|+ there right?

Right. Besides, RT does not email users a password, so they couldn’t
log in anyway. It is just the current way RT keeps track of who has
opened tickets in the past.

-darrin

rt-users mailing list
rt-users@lists.fsck.com http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

I have the same thought’s. After running for ~1 year now offering public support
we now have a very large Users table. This will be an issue down the road as
that table grows.

So to all you RT guru’s is there a way to find out if users that no longer have
tickets(I.E. spam that was deaded but users remains) can be removed? safely

Greg
Greg Dickerson
Support Manager
O’Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
T: (707) 827-7000 / (800) 998-9938
F: (707) 829-0104
www.oreilly.com----- Original Message -----
From: “Anton Krall” akrall@intruder.com.mx
To: “‘Darrin Walton’” darrinw@nixc.net
Cc: rt-users@lists.fsck.com
Sent: Wednesday, July 03, 2002 7:13 PM
Subject: RE: [rt-users] how to delete user

Sounds good to me…


Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450

-----Original Message-----
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com] On Behalf Of Darrin Walton
Sent: Mi�rcoles, 03 de Julio de 2002 08:49 p.m.
To: Anton Krall
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] how to delete user

|+ Hmmm if its not support internally, Id rather leave it like that…
|+ Anyway, users is not listed if the access RT flag is off so… No
problem
|+ there right?

Right. Besides, RT does not email users a password, so they couldn’t
log in anyway. It is just the current way RT keeps track of who has
opened tickets in the past.

-darrin


rt-users mailing list
rt-users@lists.fsck.com http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm


Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

I also have another question… Dead tickets… Im trying to do a search
on tickets… And I cann see all… Open, new, resolved but no dead :))
how can I see what tickets are marked dead???

Whenever I do a search and I input status = dead nothing comes up when
in fact I know I have dead tickets…

Any ideas?

Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com] On Behalf Of Greg Dickerson
Sent: Viernes, 05 de Julio de 2002 10:50 a.m.
To: Anton Krall; 'Darrin Walton’
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] how to delete user

I have the same thought’s. After running for ~1 year now offering public
support we now have a very large Users table. This will be an issue down
the road as that table grows.

So to all you RT guru’s is there a way to find out if users that no
longer have tickets(I.E. spam that was deaded but users remains) can be
removed? safely

Greg
Greg Dickerson
Support Manager
O’Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
T: (707) 827-7000 / (800) 998-9938
F: (707) 829-0104

From: “Anton Krall” akrall@intruder.com.mx
To: “‘Darrin Walton’” darrinw@nixc.net
Cc: rt-users@lists.fsck.com
Sent: Wednesday, July 03, 2002 7:13 PM
Subject: RE: [rt-users] how to delete user

Sounds good to me…


Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450

-----Original Message-----
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com] On Behalf Of Darrin Walton
Sent: Miércoles, 03 de Julio de 2002 08:49 p.m.
To: Anton Krall
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] how to delete user

|+ Hmmm if its not support internally, Id rather leave it like
that…
|+ Anyway, users is not listed if the access RT flag is off so… No
problem
|+ there right?

Right. Besides, RT does not email users a password, so they couldn’t
log in anyway. It is just the current way RT keeps track of who has
opened tickets in the past.

-darrin


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at
http://fsck.com/rtfm


Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at
http://fsck.com/rtfm

rt-users mailing list
rt-users@lists.fsck.com http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

I also have another question… Dead tickets… Im trying to do a search
on tickets… And I cann see all… Open, new, resolved but no dead :))
how can I see what tickets are marked dead???

Whenever I do a search and I input status = dead nothing comes up when
in fact I know I have dead tickets…

( please remember to trim your replies to only the relevant bits in future )

The thinking behind it is that you don’t want to be retrieving old 'dead’
issues through the normal UI. If you do want to be able to do it, the
code which makes it happen is in lib/RT/Tickets.pm:

        #Make sure we _never_ show dead tickets
        #TODO we should be doing this in the where clause.
        #but you can't do multiple clauses on the same field just yet :/

        if ($Ticket->Status eq 'dead') {
            return($self->Next());
        }

Most times, when people are interested in ‘dead’ tickets, they’re also on
the way to risking damage to their kneecaps by removing records from the
database[1], and have written/are using their own script to do so.

Jesse - the above gotcha seems to date from a workaround on an older
version of SearchBuilder; I don’t think its still relevant, and could be
fixed in the newer releases more elegantly :wink:

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

[1] The code explains this reference :wink:

For instance, is there a way to report all of the tickets in the DB in
an elegant manner like:

Total:

New: X
Open: Z
Etc etc

Between a time period?

Or Tickets by user:

XXX@ZZZ: ZZZ
YYYY@YYY: ZZZ

Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450-----Original Message-----
From: Bruce Campbell [mailto:bruce_campbell@ripe.net]
Sent: Sábado, 06 de Julio de 2002 02:40 a.m.
To: Anton Krall
Cc: rt-users@lists.fsck.com
Subject: RE: [rt-users] how to delete user

On Fri, 5 Jul 2002, Anton Krall wrote:

I also have another question… Dead tickets… Im trying to do a
search on tickets… And I cann see all… Open, new, resolved but no
dead :)) how can I see what tickets are marked dead???

Whenever I do a search and I input status = dead nothing comes up when

in fact I know I have dead tickets…

( please remember to trim your replies to only the relevant bits in
future )

The thinking behind it is that you don’t want to be retrieving old
’dead’ issues through the normal UI. If you do want to be able to do
it, the code which makes it happen is in lib/RT/Tickets.pm:

        #Make sure we _never_ show dead tickets
        #TODO we should be doing this in the where clause.
        #but you can't do multiple clauses on the same field just

yet :confused:

        if ($Ticket->Status eq 'dead') {
            return($self->Next());
        }

Most times, when people are interested in ‘dead’ tickets, they’re also
on the way to risking damage to their kneecaps by removing records from
the database[1], and have written/are using their own script to do so.

Jesse - the above gotcha seems to date from a workaround on an older
version of SearchBuilder; I don’t think its still relevant, and could be
fixed in the newer releases more elegantly :wink:

Regards,

                         Bruce Campbell

RIPE
Systems/Network Engineer
NCC
www.ripe.net - PGP562C8B1B
Operations

[1] The code explains this reference :wink:

Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

I’ll give you a few select statements. If you can use mysql on the
command line: you can figure out all sorts of stats from your db. These
statements go in order of increasing complexity.

Please don’t play with mysql if you really don’t know what you’re doing.
I accept no responsibility if you screw up your database. :slight_smile:

If you just want number of tickets of the different status types:

mysql> SELECT rt2.Tickets.Status, COUNT(Status) FROM rt2.Tickets GROUP
BY Status;

Which will give you something like:

| Status | COUNT(Status) |
| dead | 58 |
| new | 34 |
| open | 13 |
| resolved | 81 |
| stalled | 2 |

If you want requesters with dead tickets:

mysql> SELECT u.id, u.RealName, u.EmailAddress, COUNT(*) FROM
rt2.Tickets t, rt2.Users u WHERE t.Status = “dead” and u.id = t.Creator
GROUP BY u.id;

| id | RealName | EmailAddress | COUNT(*) |
| 17 | sample luser | sample@luser.com | 2 |

For a list of requesters with a count of the status of the tickets they
own:

mysql> SELECT rt2.Users.id, rt2.Users.EmailAddress, rt2.Tickets.Status,
COUNT(Status) FROM (rt2.Tickets LEFT JOIN rt2.Users ON
rt2.Tickets.Creator=rt2.Users.id) WHERE EmailAddress != “NULL” GROUP BY
EmailAddress, Status ORDER BY id, Status;

Which will give you something like:

| id | EmailAddress | Status | COUNT(Status) |
| 4 | luser1@luser.com | open | 1 |
| 4 | luser1@luser.com | resolved | 13 |
| 12 | luser2@luser.com | resolved | 1 |
| 17 | luser3@luser.com | dead | 2 |
| 17 | luser3@luser.com | new | 21 |
| 17 | luser3@luser.com | open | 6 |
| 17 | luser3@luser.com | resolved | 4 |
| 17 | luser3@luser.com | stalled | 1 |

To add in time period: modify the above statements adding a WHERE clause
something like:

WHERE rt2.Tickets.Resolved like ‘2001-%’

Good luck.

MattOn Sat, 2002-07-06 at 05:17, Anton Krall wrote:

For instance, is there a way to report all of the tickets in the DB in
an elegant manner like:

Total:

New: X
Open: Z
Etc etc

Thank you very much Matt… I do know some mysql but didn’t know the
data structure, this gave me a fair idea about the relationships of
fields and tables… Thx!!

Anton Krall
Intruder Consulting

email: akrall@intruder.com.mx
Celular: 044-555-105-5160
ICQ#: 4979450

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

The thinking behind it is that you don’t want to be retrieving old
’dead’ issues through the normal UI.

Fair enough. Occasionally somebody round here’s wanted to do something
like ‘show me all the tickets I killed this morning’ when they realize
that a genuine ticket isn’t there any more and they must’ve killed it
along with the spam.

        #Make sure we _never_ show dead tickets
        if ($Ticket->Status eq 'dead') {
            return($self->Next());
        }

When searching for something like ‘show me all tickets in the sales
queue’ then it makes sense to omit dead tickets. When doing ‘show me
all the dead tickets in the sales queue’, omitting dead tickets is
rather less useful!

I thought I’d modified our version of the above code to only skip dead
tickets when none of the search criteria specifically mention status
’dead’ – but I can’t find it right now, so maybe I just worked out how
to do it.

Most times, when people are interested in ‘dead’ tickets, they’re also
on the way to risking damage to their kneecaps by removing records
from the database, and have written/are using their own script to do
so.

In which case maybe the way to ‘fix’ this problem is not as I suggest
above but to remove ‘dead’ from the status drop-down box for refining a
search, so there is no user interface for doing this!

Smylers
GBdirect