Just a thought, but in a similar way that drupal.org can handle issue links and can add a strikethrough on closed issues, would it be possible to add support for issues in this module?
I was thinking it could work something like: node_id.issue eg. 345196.issue
It may require a similar function to dopl_get_page_title() called dopl_get_issue_status () for example, which runs a regex on <td>Status:</td><td>closed (fixed)</td>. If that is found add a <del> tag round the returned link.
I'd be happy to throw something together if and when I have some time.
Comments
Comment #1
the_g_bomb commentedHad a stab at it.
It's a bit weightier than I hoped, but I wanted to incorporate the features of the d.o issue filter, such as the status highlighting and assigned to title.
Let me know what you think.
Comment #2
jenlamptonLooks like this was added to the 7.x branch but g.d.o still runs on 6.x. Any hope for a backport?
Comment #3
jenlamptonwhoops, double post.
Comment #4
the_g_bomb commentedNo hope of a backport whatsoever, except maybe the one attached. Its been applied to the 6.x-2.x branch.
Comment #5
dwwInstead of screen-scraping the whole HTML for the page, I'd highly encourage you to make use of #112805: JSON menu callback for project issues (which is now deployed, and just needs review for a few followup tweaks) instead.
That said, this is cool. ;) Thanks for working on this!
Cheers,
-Derek
Comment #6
the_g_bomb commentedAnother attempt, using the new JSON menu callback, I think. Constructive criticism more than welcome.
Comment #7
the_g_bomb commentedDropping the Version down to see if it means it'll get reviewed, although both patches probably do need testing.
Comment #8
the_g_bomb commentedWhoops, wrong version.
Comment #9
z.stolar commentedTested on D6. Results are very satisfying. As for some constructive criticism:
- I think the code could use a bit of a a cleanup. Some of it is duplication of the same function.
- as you can see in the attached image: if a link cannot be generated from some reason (i.e., the page doesn't exist) the original text should be left as is, and not be hidden, so in the worst case, something readable can still be seen.
Comment #10
the_g_bomb commentedThanks z.stolar for the feedback. In all truth, I had wondered about a code cleanup, but thought it might be best dealt with under a separate issue, rather than having 2 issues merged under this one and I didn't want to change the module too much before one of the maintainers had made a comment on the feasibility of this being accepted. The way it is at the moment at least you can see exactly what has been added, rather than have to pick through, what is cleanup and what is additional functionality.
Is there a plan to backport some of the changes implemented in the D7 version?
There is an issue in the g.d.o issue queue looking for this type of functionality and consideration is being given to using this module: #1350106: Add input filter for d.o project issue numbers (which turn into links automatically), although the D7 upgrade of d.o has also been mentioned, so whether its the D7 or D6 version that is under consideration hasn't been decided.
Comment #11
the_g_bomb commentedAfter stagnating on this way too long I have updated both patches to use the JSON menu callback.
I have not attempted the code cleanup as suggested in #9, purely because that was there before this issue came about and I think it should be tackled as a separate issue. Some code improvements were obviously attempted in the D7 branch but never backported to D6 and I do think that further refactoring could be made, but like I said I may be willing to attempt that as a separate issue.
I have however fixed the empty return value as highlighted in #9, so now my test looks as follows
Comment #12
the_g_bomb commentedI suppose I should update the status as well, sorry
Comment #13
the_g_bomb commentedOK , so I relented and had a shot at refactoring the D6 code as well.
Comment #13.0
the_g_bomb commentedFixing a typo in the output of the tag
Comment #14
the_g_bomb commentedThere is a new format for the JSON rest service now that d.o has moved to D7.
#1710850: Deploy RestWS for D7 project issue JSON
Comment #15
the_g_bomb commentedWanted to record this link here as well, to save looking for it later:
https://www.drupal.org/about-drupalorg/api
Comment #16
the_g_bomb commentedAdded to the latest branch