@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+2 -2
+2 -2
src/applications/audit/editor/PhabricatorAuditEditor.php
··· 289 289 290 290 // If the commit has changed state after this edit, add an informational 291 291 // transaction about the state change. 292 - if ($old_status !== $new_status) { 293 - if ($new_status === $partial_status) { 292 + if ($old_status != $new_status) { 293 + if ($new_status == $partial_status) { 294 294 // This state isn't interesting enough to get a transaction. The 295 295 // best way we could lead the user forward is something like "This 296 296 // commit still requires additional audits." but that's redundant and