Here is a patch to allow the node body to properly render when releases do not exist.

Comments

crackerjackmack’s picture

StatusFileSize
new6.97 KB

Hrm, still couldn't 'Add Release' so here is the next patch.

crackerjackmack’s picture

mhutch’s picture

This looks like what I need.

However, I can't apply this patch to either the current CVS or the 4.5.0 release. Also, it seems unnecessaily complex - you've given a load of lines extra spaces, and I can't easily locate the actual significant changes to do a manual patch.

Anonymous’s picture

Patch appears to be backwards (must be applied with patch -R).

After applying to 4.5.0, it appears to work correctly (the extra info does, indeed, show up).

Anonymous’s picture

The actual change is just the relocation of a "}". Now the "add release" etc. shows up (Drupal 4.5.2).
A typo in release.inc(96): drupal_set_breadcrum( --> drupal_set_breadcrumb(
I can add a release but can't upload a file for it (the link points to the start page).
Finally, the project/releases page is still empty...

mslugyfw’s picture

Edit last 10 lines of "function project_menu($may_cache) " in "project.module",
replace "MENU_CALLBACK" with "MENU_NORMAL_ITEM".
After that , you will find the "release->add" in the main menu ,if you leave the "admin->settings->project->release directory" blank.

elonen’s picture

StatusFileSize
new3.92 KB

Works great. Here's an integrated patch that combines the fixes discussed above (including the original reversed patch).

sethcohn’s picture

Version: » 4.6.x-1.x-dev
Priority: Normal » Critical

While the above diff contains correct and needed fixes to 4.6 , it no longer applies correctly.

The typo in release.inc was fixed already, but the other changes need to be applied or else project 4.6 will not work correctly out of the box. So far, releases still aren't working for me, but I'm playing with why else not... and will report back.

sethcohn’s picture

Well, I give up for now... releases are clearly broken if you try and manually add them.
The above patch is needed, or else you can't even get close to a working system (links are missing from the project page), but even when the right patches are made, the main release view is broken, adding a release to a project fails to add the project to the given taxonomy display (ie the project is considered moderated)

I'm going to try and void out the moderation issue, and see what happens then. For my own purposes, I don't really want the releases code anyway, but sadly, it's pretty embedded into the project code for now.

sethcohn’s picture

To be clear: if you add a file (or just touch a phony) projectname-0.1.tar.gz file, after turning on the scan directory code, you can "manually" add a release. If you don't want to use the scan directory method, releases are now completely broken. (They used to work in 4.5 after some bugfixes) Release views such as node/XX/release is broken at this point, also release/add, etc...

Without a release, the status & moderate flags on the project are not set correctly, and the project is invisible except the 'my projects' or direct urls. So it looks broken to the average eye.

I'm not planning on fixing this, despite the time I spent figuring out how it was broken, since I'm trying to go in a different direction with the project code (a non-software project management way), so I'll be working on removing the release code altogether... the fork will be named something different and be in contrib as soon as I have something usuable for other people to see...

killes@www.drop.org’s picture

Seth: I think it would benefit the Drupal project module much more if you could put your ideas in patches and we can make the module more generic.

sethcohn’s picture

I considered it, but the truth is that the current project module is SO focused on software development moduling, that a change in the direction I'm going would be strongly resisted by those it's serving now. Combined with the large amount of assumptions that a software bugtracker/project have (rightly so), compared to something generic, I think the better answer is to fork (with a massive cull/rewrite most likely, the more I look at the existing code), and build from the ground up using a different set of assumptions.

I'm trying to model something more like GTD, real world projects, and todo lists, not bug tracking. The current project code is far from that.

stevryn’s picture

Very interested in a more "generic" project module Seth! I posted elsewhere discussing same idea. The software centric version is great, and if not for the company using a whole project tracking suite required by our customer, I would have loved to use it here for our software engineering group. Instead I am looking for more of a "To Do/Action Item" capability.

nedjo’s picture

Version: 4.6.x-1.x-dev » x.y.z
Status: Active » Needs review
StatusFileSize
new6.16 KB

Thanks for the previous patch, which indeed fixes the issue of projects not displaying without a release. The menu changes were not needed. This revised patch looks long, but in fact it's substantively only moving a single bracket, to take the bulk of the project display out of the "if there is a release" test.

nedjo’s picture

Assigned: Unassigned » nedjo
Status: Needs review » Fixed

Applied.

Anonymous’s picture

Status: Fixed » Closed (fixed)