1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/transactions
epriestley 4041a7e0f6 Add ApplicationTransaction handling for transactions with no effect
Summary:
When a user submits an action with no effect (like an empty comment, an "abandon" on an already-accepted revision, or a "close, resolved" on a closed task) we want to alert them that their action isn't effective. These warnings fall into two general buckets:

  - User is submitting two or more actions, and some aren't effective but some are. Prompt them to apply the effective actions only.
    - A special case of this is where the only effective action is a comment. We provide tailored text ("Post Comment") in this case.
  - User is submitting one action, which isn't effective. Tell them they're out of luck.
    - A special case of this is an empty comment. We provide tailored text in this case.

By default, the transaction editor throws when transactions have no effect. The caller can then deal with this, or use `PhabricatorApplicationTransactionNoEffectResponse` to provide a standard dialog that gives the user information as above. For cases where we expect transactions to have no effect (notably, "edit" forms) we just continue on no-effect unconditionally.

Also fix an issue where new, combined or filtered transactions would not be represented properly in the Ajax response (i.e., return final transactions from `applyTransactions()`), and translate some strings.

Test Plan:
  - Submitted empty and nonempy comments in Macro and Pholio.
  - Submitted comments with new and existing "@mentions".
  - Submitted edits in both applications.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T912, T2104

Differential Revision: https://secure.phabricator.com/D4160
2012-12-11 17:27:40 -08:00
..
application Allow ApplicationTransaction comments to be edited and deleted 2012-12-11 14:01:51 -08:00
constants Make timeline view prettier 2012-12-11 13:59:35 -08:00
controller Render application transactions via Ajax 2012-12-11 14:02:29 -08:00
editor Add ApplicationTransaction handling for transactions with no effect 2012-12-11 17:27:40 -08:00
exception Add ApplicationTransaction handling for transactions with no effect 2012-12-11 17:27:40 -08:00
feed Add feed integration to generic transactions 2012-12-11 14:00:21 -08:00
query Allow ApplicationTransaction comments to be edited and deleted 2012-12-11 14:01:51 -08:00
response Add ApplicationTransaction handling for transactions with no effect 2012-12-11 17:27:40 -08:00
storage Add ApplicationTransaction handling for transactions with no effect 2012-12-11 17:27:40 -08:00
view Render application transactions via Ajax 2012-12-11 14:02:29 -08:00