Page MenuHomePhabricator

Make some Audit status comparisons more lax, so state transactions only post once
ClosedPublic

Authored by epriestley on Jan 27 2017, 7:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 12:11 AM
Unknown Object (File)
Sun, Apr 21, 10:38 PM
Unknown Object (File)
Fri, Apr 19, 6:10 PM
Unknown Object (File)
Thu, Apr 11, 8:28 AM
Unknown Object (File)
Sun, Apr 7, 12:50 PM
Unknown Object (File)
Sun, Apr 7, 11:57 AM
Unknown Object (File)
Fri, Apr 5, 1:35 PM
Unknown Object (File)
Sat, Mar 30, 4:40 PM
Subscribers
None

Details

Summary

Ref T10978. Currently, too many "This audit now <something something>" transactions are posting, because this strict === check is failing to detect that the audit is already in the same state.

This is because audit states are currently integers, and saving an integer to the database and then reading it back turns it into a string. This is a whole separate can of worms. For now, just weaken the comparison. I'd eventually like to use string constants here instead of integer constants.

Test Plan

Commented on a "no audit required" commit, didn't see a double "this doesn't need audit" transaction anymore.

Also made a legit state change and did see a state transaction.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jan 27 2017, 7:07 PM
This revision was automatically updated to reflect the committed changes.