Page MenuHomePhorge

Log Herald rules having disabled Herald rules as condition via phlog()
ClosedPublic

Authored by aklapper on Jul 21 2024, 17:21.

Details

Summary

Do not silently fail when a Herald rule refers in its conditions to a disabled rule.
Allow Phorge administrators to get aware by creating an entry in the error log via phlog() instead of crossing fingers that someone may from time to time get the idea to open and read Herald transcripts.

This is similar to T15885 / D25735.

Refs T15869

Test Plan
  1. Phorge at 0873b36569bfcf502a092870d7d5f4d088ed9003
  2. Set up a Herald rule and disable it
  3. Set up a second Herald rule with several conditions, the first condition being "Another Herald rule matches" on the disabled first Herald rule
  4. Go to http://phorge.localhost/herald/test/ to apply the Herald rule on a corresponding object
  5. See an exception in the resulting transcript at http://phorge.localhost/herald/transcript/123456/
  6. After applying this patch, also find that exception in the error log

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

(Hmm should I replace $ex->getMessage() with $caught->getMessage() or not?)

(Hmm should I replace $ex->getMessage() with $caught->getMessage() or not?)

Yep thanks

src/applications/herald/engine/HeraldEngine.php
535

Also this seems wrong

(Hmm should I replace $ex->getMessage() with $caught->getMessage() or not?)

Yep thanks

But that would be inconsistent with D25735 then? :P

aklapper added inline comments.
src/applications/herald/engine/HeraldEngine.php
535

Covered in D25735

This revision is now accepted and ready to land.Jul 21 2024, 22:11