It's possible to have releases for sandbox projects because checkbox "Has project releases" is available

Example https://www.drupal.org/sandbox/nicholasalipaz/2285469

Reported by https://twitter.com/xandeadx/status/500717432407744512

CommentFileSizeAuthor
#2 sandbox.png9.73 KBandypost

Comments

drumm’s picture

Project: Drupal.org infrastructure » Project
Version: » 7.x-2.x-dev
Component: Packaging » Releases

Seems like the "Has project releases" checkbox has reappeared on editing sandbox projects.

andypost’s picture

Issue summary: View changes
StatusFileSize
new9.73 KB
tvn’s picture

Issue tags: +needs d.o bdd tests
drumm’s picture

These projects are affected:
https://www.drupal.org/node/2265517
https://www.drupal.org/node/2285469
https://www.drupal.org/node/2299591
https://www.drupal.org/node/2312479
https://www.drupal.org/node/2312751

The authors are all Git vetted users, so either removing releases or promoting them to full projects, are good cleanups.

drumm’s picture

In project_release_node_validate(), when a Git vetted user selects sandbox, and has project releases, the "Sandbox projects may not have releases. "Has project releases" checkbox cleared." message correctly shows, but

        unset($form_state['input']['field_project_has_releases']);
        form_set_value($form['field_project_has_releases'], FALSE, $form_state);

works for previews, but not node save.

andypost’s picture

The logic is very fragile in project_release_form_node_form_alter() and project_release_node_validate()

  • drumm committed c93333b on 7.x-2.x
    #2322651 Use form_set_value() properly for node add.
    
drumm’s picture

Issue tags: +needs drupal.org deployment

That should fix it. We might want to do a bit more with #states in project_release_form_node_form_alter() too.

Leaving open for cleaning up the projects in #4 and checking for more after deployment. The query is

SELECT * FROM field_data_field_release_project frp INNER JOIN field_data_field_project_type fpt ON fpt.entity_id = frp.field_release_project_target_id AND fpt.field_project_type_value = 'sandbox';

Not deploying yet because I want to be sure to run the existing BDD tests. This interaction does have a decent amount of testing already, but apparently not enough. My manual testing before would have been on node edit instead of node add. Git7site won't be working well enough to run tests until #968994: Multiple Values for listings of current companies and organizations makes it into a DB snapshot used by that site, I think it will be good tomorrow.

drumm’s picture

Project: Project » Drupal.org infrastructure
Version: 7.x-2.x-dev »
Component: Releases » Packaging
Assigned: Unassigned » drumm
Issue tags: -needs drupal.org deployment

Now deployed on Drupal.org. Moving back to infra for project cleanup.

drumm’s picture

There are no new problem releases since #4. I went ahead and turned off releases for the projects that only had dev snapshots:
https://www.drupal.org/sandbox/anybody/2312479
https://www.drupal.org/sandbox/sinasalek/2312751
https://www.drupal.org/sandbox/janvandiepen/2299591

That leaves:
https://www.drupal.org/sandbox/nicholasalipaz/2285469
https://www.drupal.org/sandbox/andrewmacpherson/refererlinkblock

Which look like they are being used as full projects, so I'll make them full projects.

drumm’s picture

Status: Active » Fixed

Now cleaned up.

Status: Fixed » Closed (fixed)

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