Page MenuHomePhabricator

Prevent users from removing task titles with "Bulk Edit"
ClosedPublic

Authored by epriestley on Mar 28 2019, 3:57 PM.
Tags
None
Referenced Files
F18103847: D20339.id48545.diff
Sun, Aug 10, 8:08 AM
F17954483: D20339.id48544.diff
Aug 1 2025, 4:05 AM
F17943017: D20339.id48544.diff
Jul 31 2025, 7:30 AM
F17942048: D20339.id48545.diff
Jul 31 2025, 6:11 AM
F17942047: D20339.id.diff
Jul 31 2025, 6:11 AM
F17928834: D20339.diff
Jul 30 2025, 4:23 PM
F17870368: D20339.diff
Jul 28 2025, 1:46 PM
F17833201: D20339.id48545.diff
Jul 26 2025, 1:22 PM
Subscribers
None

Details

Summary

See downstream https://phabricator.wikimedia.org/T209449.

The "Bulk Edit" flow works with setContinueOnMissingFields(true), so newRequiredError() errors are ignored. This allows you to apply a transaction which changes the title to "" (the empty string) without actually hitting any errors which the workflow respects.

(Normally, setContinueOnMissingFields(...) workflows only edit properties that can't be missing, like the status of an object, so this is an unusual flow.)

Instead, validate more narrowly:

  • Transactions which would remove the title get an "invalid" error, which is respected even under "setContinueOnMissingFields()".
  • Then, we try to raise a "missing/required" error if everything otherwise looks okay.
Test Plan
  • Edited a task title normally.
  • Edited a task to remove the title (got an error).
  • Created a task with no title (disallowed: got an error).
  • Bulk edited a task to remove its title.
    • Before change: allowed.
    • After change: disallowed.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable