Installation Workflow not working in RT4

I’ve tried modifying the Installation workflow located here:

https://rt-wiki.bestpractical.com/wiki/WorkFlow

For onboarding employees. So the Required CFs would be things like ‘VPN Access’, ‘WiFi Access’ etc.

As fr as I can tell I’ve followed the steps correctly, other than it’s on RT4 instead of RT3. When I create the parent ticket, none of the child tickets get created. In syslog I get a lot of this:

Aug 14 08:45:31 tracker RT: [2684] Scrip IsApplicable 18 died. - Require of RT::Condition::FieldRequired condition module failed.#012Attempt to reload RT/Condition/FieldRequired.pm aborted.#012Compilation failed in require at /opt/rt4/sbin/…/lib/RT/ScripCondition.pm line 179.#012#012Stack:#012 [/opt/rt4/sbin/…/lib/RT/ScripCondition.pm:179]#012 [/opt/rt4/sbin/…/lib/RT/ScripCondition.pm:179]#012 [/opt/rt4/sbin/…/lib/RT/Scrip.pm:593]#012 [/opt/rt4/sbin/…/lib/RT/Scrips.pm:333]#012 [/opt/rt4/sbin/…/lib/RT/Transaction.pm:194]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:1682]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2827]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2521]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2467]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:982]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:961]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:2852]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:2961]#012 [/opt/rt4/share/html/Ticket/Modify.html:98]#012 [/opt/rt4/share/html/Ticket/Modify.html:103]#012 [/opt/rt4/share/html/Ticket/autohandler:66]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:697]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:376]#012 [/opt/rt4/share/html/autohandler:53]#012#012#012Stack:#012 [/opt/rt4/sbin/…/lib/RT/ScripCondition.pm:179]#012 [/opt/rt4/sbin/…/lib/RT/Scrip.pm:593]#012 [/opt/rt4/sbin/…/lib/RT/Scrips.pm:333]#012 [/opt/rt4/sbin/…/lib/RT/Transaction.pm:194]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:1682]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2827]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2521]#012 [/opt/rt4/sbin/…/lib/RT/Ticket.pm:2467]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:982]#012 [/opt/rt4/sbin/…/lib/RT/Record.pm:961]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:2852]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:2961]#012 [/opt/rt4/share/html/Ticket/Modify.html:98]#012 [/opt/rt4/share/html/Ticket/Modify.html:103]#012 [/opt/rt4/share/html/Ticket/autohandler:66]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:697]#012 [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:376]#012 [/opt/rt4/share/html/autohandler:53]

I’ve tried installing FieldRequired.pm into /opt/rt4/lib/RT/Condition instead of /opt/rt4/local/lib/RT/Condition as the Wiki says, but this didn’t help.

For laughs I decided to configure this exactly as it is in the wiki (ie using CF of Power and DNS etc).

I figured out that RT::Condition::Generic is deprecated and no longer exists in RT4, so I edited FieldRequired.pm to change RT::Condition::Generic to just RT::Condition and tried again. However I still get the same result.

Turns out changing all instances of RT::Condition::Generic to just RT::Condition in the FieldRequired.pm script did fix the issue. I needed to restart the web server for the change to take affect.

Not a module we use so I might not be much help, but what output do you get from:

perl -cw /opt/rt4/local/lib/RT/Condition/FieldRequired.pm

Any errors there? I’ve made a hacked copy of the same module on our test system and I don’t see any static errors in the Perl compilation, but then I’ve not got your custom fields, etc installed so I’m not triggering it “live”.

Also make sure you only have the copy in your local hierarchy, otherwise you might end up altering that and not seeing a change because the one in the main hierarchy is overriding it. Only put locally generated libraries, hacked HTML, CSS, etc under local.

I managed to get it working by using RT::Condition instead of the deprecated RT::Condition::Generic. My initial test of this failed, but it worked after I restarted Apache.

Thanks for your reply.

1 Like