The problem appears in this sandbox project. When creating it, I left "Has project releases" enabled. Upon creation, there was a message which, correctly, pointed out that releases are not available for sandbox projects and that this option has therefore been deactivated.

However, something seems to have gone wrong there because, while the project is still definitely a sandbox project, I was able to add a release and enable automated testing (which fails, though, because it tries to retrieve the repository from the wrong location).
Since I'm not able to do this for other sandbox projects (and testing, as said, doesn't work correctly) I think the policy hasn't changed here but that this is a bug.

Comments

drunken monkey’s picture

Title: Can enable releases and tests » Can enable releases and tests for sandbox projects
drumm’s picture

Assigned: Unassigned » drumm
drumm’s picture

Project: Drupal.org customizations » Project
Version: 7.x-3.x-dev » 7.x-2.x-dev
Component: Code » Projects

In project_release_node_validate,

        drupal_set_message(t('Sandbox projects may not have releases. "Has project releases" checkbox cleared.'), 'warning');
        form_set_value($form['field_project_has_releases'], FALSE, $form_state);

is being triggered on both node save and update. form_set_value() works on node save, but not update.

  • Commit 5af0184 on 7.x-2.x by drumm:
    #2245089 Do not allow releases to be enabled when editing sandbox...
drumm’s picture

Status: Active » Fixed
Issue tags: +needs drupal.org deployment

I'm sure there is a more correct way to do this, but it works.

drumm’s picture

Issue tags: -needs drupal.org deployment

Deployed to Drupal.org and cleared out our data.

drumm’s picture

Title: Can enable releases and tests for sandbox projects » Can enable tests for sandbox projects
Project: Project » Project issue file test
Component: Projects » Code
Assigned: drumm » Unassigned
Status: Fixed » Active

Moving to PIFT for the automated testing part of this issue.

jthorson’s picture

Status: Active » Needs review

From pift_project_visibility():

  if (!empty($node->field_project_has_releases[LANGUAGE_NONE][0]['value'])) {
      // Ensure user has the 'access project testing tab' permission
      if (user_access('access pift project testing tab')) {
        return TRUE;
      }
    }

So as long as the releases piece is taken care of, the 'enable' checkbox should never appear (and thus users will not be able to enable testing).

If testing is still enabled on the sandbox, we'll need to disable it manually within the db:

delete from pift_project where pid = 2235889;

If not, then there's nothing left to do here, and the issue can be closed. :)

jthorson’s picture

Status: Needs review » Fixed

Automated testing has been disabled for the sandbox project.

Status: Fixed » Closed (fixed)

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