Homec4science

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

Authored by epriestley <git@epriestley.com> on Jan 27 2017, 20:03.

Description

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

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17258

Details

Committed
epriestley <git@epriestley.com>Jan 27 2017, 20:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPH9829ecddd695: Clean up "reorder" permissions in MenuEngine for personal favorites
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1be3ef022768: Make some Audit status comparisons more lax, so state transactions only post… (authored by epriestley <git@epriestley.com>).Jan 27 2017, 20:10