Changes between Version 1 and Version 2 of Ticket #525, comment 86
- Timestamp:
- Mar 18, 2012, 10:28:09 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #525, comment 86
v1 v2 13 13 || foo || +baz, bar || bar || 14 14 15 Hm, but that would mean you can't replace a list field with two new items. Her first `baz` clears the list, then `bar` clears the list again:15 Edit 1: Hm, but that would mean you can't replace a list field with two new items. Her first `baz` clears the list, then `bar` clears the list again: 16 16 ||=Old value ||=Batch change ||=New value\\(list field)|| 17 17 || foo || baz, bar || bar || 18 18 19 Is it better to ''replace the whole field'' only once, before any "+..." and "-..." processing .19 Is it better to ''replace the whole field'' only once, before any "+..." and "-..." processing: 20 20 1. If any item is not a "+..." or "-...", clear the whole field. 21 21 2. For each item, if it's a "+..." or "..." item add it. If it's a "-..." item, remove all occurrences. 22 23 Edit 2: More useful and more intuitive would be to ''carry over'' the operator to the next item if it does not have an operator of its own. 24 25 ||=Old value ||=Batch change ||=New value\\(list field)||=Summary|| 26 || foo || +bar, baz || foo, bar, baz ||baz inherits + || 27 || foo, bar, baz || -bar, baz || foo ||baz inherits - || 28 || foo || bar, +baz || bar, baz ||bar replaces whole field, then baz is added.\\(Not really useful.)|| 29 || foo, baz || bar, -baz || bar ||bar replaces whole field, then baz is (already) removed.\\(Not really useful.)|| 22 30 23 31 > Looking at the table, I realize that there's not really a valid use case for "+..." and "-..." for non-list fields. So yeah, simply drop the rule for those (and simply replace the old value with the batch change).