some project maintainers want to be able to hide the table of development snapshots on their project nodes.
see http://lists.drupal.org/archives/development/2006-12/msg00047.html for example.
this would be very easy to add:

  • new column in the {project_release_projects} table
  • new checkbox on the "releases" subtab on the project edit tab
  • conditional around the call to project_release_table() that appends the dev snapshot table.

i'm all in favor, but don't have time to quickly roll this myself right now.
i also tend to think that http://drupal.org/node/101601 is higher priority (though more work).

cheers,
-derek

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
FileSize
5.73 KB

this was so easy, i decided to just do it (took me ~15 minutes to roll this patch and test it on my local site). ;)
i must sleep now, but i'll try testing this on scratch.d.o. tomorrow. if there are no objections, i'll install on d.o on friday.

cheers,
-derek

dww’s picture

i guess i could add code to remove this checkbox if a project has no official releases (the 'snapshot_table' column defaults to 1 in the DB, anyway). not sure if that'd be a helpful UI simplification or needless bloat... input on this would be appreciated. ;)

thanks,
-derek

hunmonk’s picture

so, if there were no official releases, and the project maintainer checked the box, an end user would be left seeing nothing to download from the project page, right? this is, i guess, fine -- i don't see why a project _has_ to have tarballs listed.

out of curiosity, if a project maintainer does hide the dev snapshot table, is there any point in building the dev tarballs for that project at all? seems like we could get a performance improvement here by having the script that builds the tarballs skip these kinds of projects -- which i know is another level of complexity for this 'simple' patch. just thought i'd bring it up... :)

coreb’s picture

I'm not a project maintainer, but as someone who occaisonally provides support, I say this is definitely a useful (needed?) improvement. End user's that are not familiar with our (new) versioning scheme will only see that something is available for download. When it doesn't work, they start posting forum/support request issues on it, not realizing that what they are using isn't meant for "production use".

I'll second the optimization hunmonk mentions also. I think there are alot of modules that could be being packaged unneccessarily.

dww’s picture

out of curiosity, if a project maintainer does hide the dev snapshot table, is there any point in building the dev tarballs for that project at all?

yes:

  • you can still find them from the "view all releases" page
  • there's plans for a whole "releases" tab on the project page with various subtabs. one of those might be "development snapshots" (http://drupal.org/node/96971)
  • if you only have a dev snapshot for a given version of core, and someone is filtering the project browsing pages (e.g. http://drupal.org/project/Modules/name) by that version, the "Download" link *will* point to the dev snapshot, even if this box is unchecked.
  • if you *really* don't want anyone to see a given dev snapshot, either a) don't create it in the first place or b) have someone unpublish it if it was created automatically during the conversion to the new system. in the future, project maintainers will be able to do this themselves (http://drupal.org/node/90531).

that said, i noticed a minor bug in my previous patch. project_release_update_2() was adding this column, but project_release_install() was not. so, new installations would be missing it. attached patch fixes this.

cheers,
-derek

dww’s picture

Status: Needs review » Fixed

committed to DRUPAL-4-7--2, installed on d.o, and project_release_update_2() ran without errors.
the "Display snapshot releases on project page" is hereby open for business. ;)

cheers,
-derek

pwolanin’s picture

Status: Fixed » Needs work

@dww - this is a great improvement and I really appreciate all your hard work on this code.

A minor point - when you submit the new settings, there is no confirmation message like 'the settings have been updated', which left me wondering if things were working correctly. Can you add a drupal_set_message() to the _submit function?

dww’s picture

Status: Needs work » Fixed

committed to DRUPAL-4-7--2 (http://drupal.org/cvs?commit=47640) and installed on d.o. thanks for the suggestion.

Anonymous’s picture

Status: Fixed » Closed (fixed)