Currently, PIFT doesn't support testing of sandboxes, but pift_form_project_issue_project_edit_form_alter() - which adds the testing status checkbox - doesn't distinguish between sandbox and full project nodes.
This prevents us from enabling the checkbox for all users as suggested in #1093886: Allow 'pift enable project testing' permission for project owners/enabled users.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1299910-6.pift-no-testing-settings-for-projects-without-releases.patch | 1017 bytes | dww |
| #1 | 1299910-1.pift-no-testing-settings-for-sandboxes.patch | 946 bytes | dww |
Comments
Comment #1
dwwThis isn't beautiful, but I didn't want to nest the entire function inside the if() so I'm just returning early. Also, apologies there's no node object already passed around in the form or form_state, so we have to load it here to get what we're looking for. At least it should be cached by node_load().
Anyway, tested this locally and it's working but another pair of eyes wouldn't hurt. ;)
Cheers,
-Derek
Comment #2
boombatower commentedAssuming project['sandbox'] is the right key looks good. I don't have test environment so I won't mark as RTBC.
Comment #3
dwwYup, I verified that in both code and testing.
Comment #4
boombatower commentedSounds good enough?
Comment #5
boombatower commentedCommitted. Thanks.
Comment #6
dwwThinking about this over lunch, I realized we added the wrong check. We don't really care if it's a sandbox or not. What we most care about is if the project has releases enabled or not. For example, we don't want this checkbox on the edit tab for the infrastructure project, either. And, if we change the configuration of the site to allow releases for sandboxes, we're not going to have to un-do this check, since it'll Just Work(tm).
I've tested this locally and it works as expected.
Comment #7
dwwComment #8
boombatower commentedYea that is a better check.
Comment #10
rfayLooks like #6 never got committed due to accidentally getting set to "fixed" in #8
Comment #11
dwwIt was committed: http://drupal.org/commitlog/commit/4340/d1fc384feb2299aae168d1237c849d59...