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.

Comments

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
StatusFileSize
new946 bytes

This 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

boombatower’s picture

Assuming project['sandbox'] is the right key looks good. I don't have test environment so I won't mark as RTBC.

dww’s picture

Yup, I verified that in both code and testing.

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Sounds good enough?

boombatower’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

dww’s picture

Status: Fixed » Needs review
StatusFileSize
new1017 bytes

Thinking 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.

dww’s picture

Title: Remove 'Enable Automated Testing' checkbox from sandbox projects » Remove 'Enable Automated Testing' checkbox from projects without releases
boombatower’s picture

Status: Needs review » Fixed

Yea that is a better check.

Status: Fixed » Closed (fixed)

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

rfay’s picture

Status: Closed (fixed) » Needs review

Looks like #6 never got committed due to accidentally getting set to "fixed" in #8

dww’s picture

Status: Needs review » Closed (fixed)