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

the_g_bomb’s picture

Status: Active » Needs review
StatusFileSize
new7.35 KB

Had 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.

jenlampton’s picture

Issue tags: +needs backport to 6.x

Looks like this was added to the 7.x branch but g.d.o still runs on 6.x. Any hope for a backport?

jenlampton’s picture

Issue tags: -needs backport to 6.x

whoops, double post.

the_g_bomb’s picture

No hope of a backport whatsoever, except maybe the one attached. Its been applied to the 6.x-2.x branch.

dww’s picture

Instead 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

the_g_bomb’s picture

Another attempt, using the new JSON menu callback, I think. Constructive criticism more than welcome.

the_g_bomb’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

Dropping the Version down to see if it means it'll get reviewed, although both patches probably do need testing.

the_g_bomb’s picture

Version: 6.x-1.x-dev » 6.x-2.5

Whoops, wrong version.

z.stolar’s picture

Status: Needs review » Needs work
StatusFileSize
new106.73 KB

Tested 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.

the_g_bomb’s picture

Thanks 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.

the_g_bomb’s picture

After 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

the_g_bomb’s picture

Status: Needs work » Needs review

I suppose I should update the status as well, sorry

the_g_bomb’s picture

OK , so I relented and had a shot at refactoring the D6 code as well.

the_g_bomb’s picture

Issue summary: View changes

Fixing a typo in the output of the tag

the_g_bomb’s picture

There 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

the_g_bomb’s picture

Wanted to record this link here as well, to save looking for it later:
https://www.drupal.org/about-drupalorg/api

the_g_bomb’s picture

Status: Needs review » Fixed

Added to the latest branch

Status: Fixed » Closed (fixed)

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