The drush issue queue commands will catch fire if a) someone deletes an issue comment, and b) the nid-#commentIndex selector is used in drush iq-apply-patch. See http://drupal.org/node/1078108#comment-6347840.
This patch adds the comment subject, which contains "#1", etc., as 'commentIndex' in the json output. This allows Drush to figure out what the correct index value for each comment is, even if someone deletes an earlier comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | project-issue-number.patch | 1.28 KB | greg.1.anderson |
| project-issue-commentIndex.patch | 1.5 KB | greg.1.anderson |
Comments
Comment #1
bdragon commentedUsing {project_issue_comments}.comment_number is a better way of getting at that.
Comment #2
dwwI'm not so sure. That table's going away in D7, so it seems short-sighted to depend on that. The dust is still settling on #1632492: Figure out and port project_issue comment numbering functionality to D7, but it seems like in any case, we're still going to use the comment subject field to hold the "#N" comment identifier. If anything, I'd just say we should call it "commentSubject" or "commentTitle" or something, and just let it be what it is.
Comment #3
greg.1.anderson commentedWe could include both...
Maybe redundant. If you want me to take one out, let me know and I'll re-roll; it can be called anything and pulled from anywhere, for my purposes. Just let me know what's best.
Comment #4
moshe weitzman commentedI like dww's idea to use commentSubject since that will keep working for a long time
Comment #5
greg.1.anderson commented#3 has commentSubject; let me know if I should take out commentNumber.
Comment #6
dwwSeemed silly to make you re-roll this. I just took your patch from #1 and modified it to rename the key from 'commentIndex' to 'subject'.
At first, I committed/pushed it as 'commentSubject' but then I realized this is all inside a 'comments' subarray, and none of the other properties use a 'comment' prefix on the keys (e.g. the status is just called 'status', not 'commentStatus'), so I changed it to 'subject' for consistency. Sorry that means you'll have to re-roll at #1078108: Drush issue queue commands but that seemed like a better patch to have you re-roll, anyway. ;)
So, committed, pushed, and deployed live. Behold:
https://drupal.org/node/1730728/project-issue/json
Cheers,
-Derek
Comment #7
greg.1.anderson commentedCool -- thank you!