Jump to:
| Project: | Drupal.org infrastructure |
| Component: | Database |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
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=...
#2
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).
#3
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.
#4
#175555: Add custom Priority Levels has landed, so scheduled some downtime to get this live on d.o:
http://drupal.org/node/858682
#5
HELL YEAH!!!!!!!!!!!!!! Thank you SO much, all! :D
#6
noting the procedure here for the update, since there's some special db hacking we need to do first:
select nid, priority from project_issues WHERE priority NOT IN (1, 2, 3);UPDATE project_issues SET priority = 2, priority_weight = 2 WHERE priority NOT IN (1, 2, 3);#7
deployed on drupal.org.
#8
Reopened #669048: We should have four priorities not three (introduce a new 'major' priority) to complete documentation for our new priority
#9
Automatically closed -- issue fixed for 2 weeks with no activity.