[rt-users] Fwd: How to list all enabled users in Perl script?
Nathan Cutler
presnypreklad at gmail.com
Tue Sep 3 08:28:11 EDT 2013
> Find `sub Next` in lib/RT/Extension/MergeUsers.pm, put logging or printing
> debug statements there to check what is going on.
OK, I'll try that. I ran some more tests on my testing RT instance.
Here's what I just found out:
When no users are merged, the script produces the same output (same
users, same number of users) as the SELECT statement. When I then go
and merge a single user into another user, the number of users
produced by the script decreases by *two* -- the merged user *plus*
the alphabetically last user.
For example: with no users merged, the SELECT and the script both
return 63 rows (users). After user X is merged into user Y, the script
returns 61 rows (users), instead of 62 that would be expected. The two
missing users are user X and user Z (the last user in the alphabetical
listing produced by SELECT).
In my production instance, I have 8 merged users and the number of
users produced by the script is 16 less than the SELECT listing. In
addition to the 8 merged users, the 8 users at the end of the alphabet
are missing.
So it looks like an "off-by-one" bug.
Nathan
More information about the rt-users
mailing list