This issue is related to infrastructure tasks that are needed to get custom issue priorities enabled on d.o,
The patch/implementation in Project Issue tracking is found in #175555: Add custom Priority Levels and the content and guidelines for the new priority is in #669048: We should have four priorities not three (introduce a new 'major' priority).

I did a few sanity checks on the patch on scratch.d.o, and noticed that there are some issues in the current d.o database that don't have valid issue priority (or priority_weight).


mysql> SELECT nid, priority, priority_weight from project_issues WHERE priority NOT IN (1, 2, 3);
+------+----------+-----------------+
| nid  | priority | priority_weight |
+------+----------+-----------------+
|   25 |        4 |               4 | 
|   95 |        4 |               4 | 
|  113 |        4 |               4 | 
|  181 |        6 |               6 | 
|  785 |        4 |               4 | 
|  810 |        4 |               4 | 
|  811 |        4 |               4 | 
|  875 |        4 |               4 | 
|  978 |        4 |               4 | 
| 1004 |        4 |               4 | 
| 1109 |        4 |               4 | 
| 1163 |        4 |               4 | 
| 1212 |        4 |               4 | 
+------+----------+-----------------+
13 rows in set (0.11 sec)

This is a small issue, but it remains none the less, and adding a new issue (to {project_issue_priority}) will probably receive the priority_id of 4, and would then conflict with these issues. Probably not a huge deal, but wanted to point this out before going ahead with the new custom priority.

Comments

mikey_p’s picture

You can see all these issue if you filter and sort the issues view: http://drupal.org/project/issues?order=priority&sort=asc&text=&projects=...

mikey_p’s picture

Also related, project_issues.priority_weight needs an index if one hasn't been added yet. There is a patch for this at #175555-51: Add custom Priority Levels.

I tested the patch on scratch.d.o and from the views UI reporting, the query went from ~300ms, to ~11ms after the patch. Hitting it repeatedly after that was consistently 6-7ms (I'm assuming that is the query cache).

hunmonk’s picture

for those existing priorities that are not 1-3, we should run

UPDATE project_issues SET priority =3, priority_weight = 3 WHERE priority NOT IN (1, 2, 3);

prior to our adding the major priority.

hunmonk’s picture

#175555: Add custom Priority Levels has landed, so scheduled some downtime to get this live on d.o:

http://drupal.org/node/858682

webchick’s picture

HELL YEAH!!!!!!!!!!!!!! Thank you SO much, all! :D

hunmonk’s picture

noting the procedure here for the update, since there's some special db hacking we need to do first:

  1. mysqldump drupal project_issues table
  2. check existing bad priorities with select nid, priority from project_issues WHERE priority NOT IN (1, 2, 3);
  3. fix with UPDATE project_issues SET priority = 2, priority_weight = 2 WHERE priority NOT IN (1, 2, 3);
  4. run update 6005
  5. add major priority at admin/project/project-issue-priority
hunmonk’s picture

Status: Active » Fixed

deployed on drupal.org.

Owen Barton’s picture

Reopened #669048: We should have four priorities not three (introduce a new 'major' priority) to complete documentation for our new priority

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Component: Database » Servers