If I do not enable the Project releases module which is optional and try to access the main issues view of a project going to /project/issues/PROJECTNAME gives me the following error:

Fatal error: Call to undefined function project_release_get_releases() in /home/vhosts/SITEDIR/drupal/sites/all/modules/project_issue/views/handlers/project_issue_handler_filter_issue_version.inc on line 63

Cheers

CommentFileSizeAuthor
#2 project_release_dependency.patch954 bytesmarcp

Comments

subcomandante’s picture

And if I enable the "Project releases" module without creating any release it seems to work.

marcp’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new954 bytes

Not sure if we really want a module_exists() call in a project_issue views handler, but this tiny patch fixes the problem and gets rid of the dependency.

dww’s picture

Status: Patch (to be ported) » Needs review

(what needs to be ported here?)

Yes, I have a nearly identical patch on my laptop. ;) Until we have a real solution for #75565: make a hook to get version options for a given project and #239485: attach an issue queue to any node type. I think calling module_exists() like that is about the best we can hope for. This field (and filter) is already smart about hiding itself when there are no version options for a given project (e.g. for http://drupal.org/project/issues/infrastructure) so I think it's fine to just add brains in here that if project_release isn't enabled, there are never any versions for issues. Better to put the conditional logic here than into the default views themselves, etc.

I'll probably commit this (or something like it) soon, but I need to look a little closer.

marcp’s picture

Yeah, I never saw the field/filter, so it seemed pretty safe to just module_exists() it out.

Sorry about the "(to be ported)" -- that was the first time I'd seen the new status choices and it was the only one with the word "patch" in it. I figured that you'd set me straight!

AmrMostafa’s picture

subscribe

aclight’s picture

#438262: Project release dependency has been marked as a duplicate of this issue.

dww’s picture

Status: Needs review » Fixed

After further review and testing, committed #2 to HEAD. Thanks folks, and sorry for the delay.

marcp’s picture

No, Derek -- thank YOU!

It's good to see us getting closer to a 6.x release. The project_issue page still mentions a dependence on Views 6.x-2.x-dev, but that's probably not still the case.

Probably not the right place to ask this, but what remains before a 6.x release of project/project_issue?

dww’s picture

@marcp: Funny you should ask ;) #439958: Document issues left before 6.x official release

Thanks for the reminder about the project page -- I just fixed that to mention views 6.x-2.5 which is the current requirement. I also added a link to #439958 there...

fuzzy_texan’s picture

Status: Fixed » Closed (fixed)
Issue tags: -6.x-1.0 blocker

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