I've noticed a few times that when a new -dev release is created for a project it doesn't seem to be visible by default, it shows on the "all releases" page but not the project's main page. This is because the "Show in project's download table when branch is supported" checkbox is not visible when creating the release, and it appears to default to "off" for at least some use cases. The field should either default to "on" or it should be available on the node/add/project-release page.

Comments

DamienMcKenna created an issue. See original summary.

drumm’s picture

I don't think this is hidden for most users, however it is missed.

Defaulting to on is a good idea.

It shouldn't be hidden, especially for core. Core has multiple minor versions per major version, 8.1.x vs. 8.2.x, so the checkbox offers some control above and beyond the admin releases page.

damienmckenna’s picture

StatusFileSize
new88.68 KB

@drumm: So, for whatever access roles I have, I can't see the mysterious checkbox and have ran into this several times, and I'm not the only one either.

This is what I see when I try to create a new release for Nodewords. Please tell me what checkbox I'm missing:

Create project release.

ultimike’s picture

StatusFileSize
new39.15 KB

I can see the checkbox when editing a release node, but not when adding a new one.

Add to table button.

damienmckenna’s picture

Title: New -dev releases hidden by default? » "Show in project's download table" checkbox unavailable on node/add/project/release
Issue summary: View changes

@ultimike: Ah! I never thought of going back to editing a release.

I've updated the title accordingly.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new722 bytes

Looking through the codebase, the following seems to be controlling this:

function project_release_field_access($op, $field, $entity_type, $entity, $account) {
  // Require administer projects for custom version format strings.
  if ($op === 'edit') {
    if ($field['field_name'] === 'field_release_version_format') {
      return user_access('administer projects', $account);
    }
    elseif ($field['field_name'] === 'field_show_download') {
      return !empty($entity->field_release_build_type) && $entity->field_release_build_type[LANGUAGE_NONE][0]['value'] === 'dynamic';
    }
  }
}

This patch should change the default value to 1, though I've not tested it ;)

drumm’s picture

Project: Project » Version Control / Project* integration
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Releases » Code
Assigned: Unassigned » drumm
Status: Needs review » Needs work

I'm only maybe 75% sure this would be a good default. I'd like to use this field more in the future, I think it is more straightforward to use the node form than admin projects. Currently what should happen for the field's value for tagged releases is unknown.

I found a good place in versioncontrol_project to add this.

  • drumm committed e6b2644 on 7.x-1.x
    Issue #2673524: "Show in project's download table" checkbox unavailable...
drumm’s picture

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

I think that commit will fix it.

drumm’s picture

Issue tags: -needs drupal.org deployment

This has been deployed to Drupal.org. Thanks for the help tracking this down!

Status: Fixed » Closed (fixed)

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