Custom Roles causing ticket creation fail due to group creating/loading fail

I have created a few custom Roles, but am experiencing erratic behavior. Sometimes tickets are not created as creating the role groups fails, but it’s not clear what causes it. I disabled roles - it works, i enable them all, works again, then later tickets fail to create again. I found a role to disable to make it work (Drivers), changed it’s name to “fred” - works, change to “funker” doesn’t work. I swapped the names of some roles - works. now 2 sites stopped working, but work again after disabling “booking agent”. It’s voodoo. I’m baffled. Any suggestions to other tests i can perform?

error from rt-4.4.0 (i know i should upgrade, but it’s a massive job)

7933] [Sat Nov 16 06:11:58 2019] [critical]: Couldn’t create ticket groups for ticket 18381. aborting Ticket creation. (/var/www/rtl/lib/RT/
[7933] [Sat Nov 16 06:11:58 2019] [crit]: Ticket creation failed: test: Ticket could not be created due to an internal error (/var/www/rtl/lib/RT/Interface/

I think it’s related to
my $create_groups_ret = $self->_CreateRoleGroups();
in and from line 645 in /var/www/rt/lib/RT/Record/Role/

return (0) if $role->{CreateGroupPredicate}
&& !$role->{CreateGroupPredicate}->(%create);

if i hash out the offending abort lines, the ticket creates, with without requestor

[29827] [Thu Nov 14 20:08:14 2019] [critical]: Attempting to add a member to a group which wasn’t loaded. ‘oops’ (/var/www/sm-rt/wt/sbin/…/lib/RT/

thanks in advance.


Both of the lines mentioned 397 and 771 look like POD documentation and not code when I look at a 4.4.0 RT. Did you customize these files or maybe you are not on 4.4.0?

yes, i did. correct lines are 443, and is line 700, 660 in

You can start by setting your log level to “debug” so that we can see the actual error, and if you customized the core code somewhere I would assume that is what is causing the issue.

Log level is on debug and that’s the error. the only modifications to are to the text for logging/errors - eg changing RT to SM. no actual code changes. It was all happy all of yesterday, until 9pm when they started failing again. I have disabled the custom role “Booking Agent” and it’s ok again. (the other 5 roles have a single word, but that’s not proven to be the issue.). There have been no changes to any code yesterday

Now i have disabled “booking agent” on all sites, i’ve had no further problems. all other roles exist, but have single word names. I think i have to conclude that it’s the 2 word role name that is causing the issue