Hi,

Sorry I realise I was not that clear in my last post, so I will try again. Then one creates a new case one always has athe ability to choose which project to use, but I would like to thie this option. Instead I want it to always default to the current project.

In your module you mention this as being a possibility, if you up the weight of your module. See below.

// Make sure that CT case nodes are posted only into one OG group: the one
  // which is the CT project.
  // If we want to completely hide the group selection fieldset, we must be
  // sure that ctog.module has greater weight than og_access.module (see
  // ctog.install), so this module's hook_form_alter() is triggered AFTER
  // og_access.module's one.

I chaned the weightm, but the group selection was still visible.

Any ideas ?

Comments

boobaa’s picture

Status: Active » Postponed (maintainer needs more info)

If I understand you correctly your problem is that the form still has one group/project selector (out of the original two), though I think its default should already be the "current" group/project. Do you even want this selector to be removed? If so, how should one choose the group/project of the case/post when there is no "current" one (like on node/add/case)?

If I understand your problem incorrectly then you still have both the group/project selectors, in which case I'm unable to reproduce your problem. If it's the case, then please describe every step how should I be able to reproduce it. Thanks.

amfis’s picture

In organic groups you always get group selected, if so - remove other groups selection and assign case to current group.

I think this is how it should be.

Now, you wrote some comments in your module as charles.holtzkampf described. I also changed weights of module, but group selection is still there.

amfis’s picture

Ok, looks like sorted.

In ctog.module @ line: 118 i've changed:

from:
$form['casetracker']['pid']['#default_value'] = $pid;

to:

// $form['casetracker']['pid']['#default_value'] = $pid;
        
$form['casetracker']['pid'] = array(
   '#type' => 'hidden',
   '#value' => $pid,
);

This behavior fits the place, cause this action is made, when group id is presented. In other ways, when no group id is passed, group selection appears.

boobaa’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

This is not related to CTOG at all, but some custom site requirements. Additionally, I think the last sentence of the previous comment is simply wrong.

amfis’s picture

Might be.