Page MenuHomePhabricator

Negative Maniphest priorities can be created, but not used
Closed, ResolvedPublic

Description

In Configuration, one can create a maniphest.priorities object with a negative key (i.e., a priority lower than Wishlist). However, when trying to actually create a task with that priority, the following AphrontQueryException is shown:

#1264: Out of range value for column 'priority' at row 1

Related Objects

Event Timeline

jonah214 assigned this task to epriestley.
jonah214 raised the priority of this task from to Needs Triage.
jonah214 updated the task description. (Show Details)
jonah214 added a project: Maniphest.
jonah214 added a subscriber: jonah214.
epriestley triaged this task as Wishlist priority.Sep 18 2014, 5:41 PM

We'll validate the config, but priorities must be nonnegative.

Any particular reason they should be nonnegative? This is annoying because there is thus no way to create a priority lower than "wishlist". If I bump up wishlist's priority to (say) 10 and put my new priority ("dreaming") as 0, then all the things that were already "wishlist" become "dreaming", which I don't want.

You can safely:

SELECT * FROM phabricator_maniphest.maniphest_task WHERE priority = 10;

Make sure that's empty (i.e., your target priority is unused), then:

UPDATE phabricator_maniphest.maniphest_task SET priority = 10 WHERE priority = 0;

If you have ~hundreds of tasks, you can also batch-move priorities with the batch editor. After T5166, this should handle arbitrarily large numbers of tasks.