First off, I want to say thank you for this module! It is exactly what I needed.

I am using your suggestion in #2530000-1: Bulk assign of content to groups to convert all my existing content to groups. However, I am now trying to find a way to automatically assign the group via Rules with any new content.

The previous workflow was selecting a taxonomy term as the "group." Until I can find a way to make the new group field a dropdown, I was hoping to keep the taxonomy term and use that to assign the group.

My terms and groups are both titled with numbers only (e.g. 4545). I tried to set node:group:title to node:field-term:name, but I get an error.

Unable to modify data "node:group:title": Unable to set the data property title as the parent data structure is not set.

Do you have any suggestions for how to configure a rule to assign the group based on the taxonomy term?

Comments

kristiaanvandeneynde’s picture

I would avoid using taxonomy terms for this. You already have a Group dropdown or autocomplete depending on your permissions when creating new content. Anyone who creates content and has the right to create it inside a group will see that form element.

MrPeanut’s picture

My taxonomy terms match my groups exactly (term 4545 and group 4545). I am using taxonomy terms because of the following:

  • Ability to automatically select the term when creating new content. (Users would only have one term available via TAC Lite.) On the Group settings tab, there is a default of None, even though it is required and there is only one option available.
  • Ability to move the term reference field in with the other fields. As part of my users' workflow, it makes sense to have my term reference field right after the title field.

I would love to avoid using terms, but is there a way to accommodate both of those with this module?

For the time being, I just created individual rules for each term/group pair. (Far from ideal, but it is working.)

kristiaanvandeneynde’s picture

On the Group settings tab, there is a default of None, even though it is required and there is only one option available.

That's a known UX fail and will be fixed.

Ability to move the reference field

You could move it with a simple form rewrite (off the top of my head, may need validation):

function MYMODULE_form_node_form_alter(&$form, &$form_state) {
  if (isset($form['group_settings']['gid'])) {
    $form['gid'] = array(
      '#weight' => -10, // Your weight here.
      '#parents' => array('group_settings', 'gid'),
    ) + $form['group_settings']['gid'];
    unset($form['group_settings']);
  }
}
Soul88’s picture

Status: Active » Closed (outdated)

We thank everyone for their collaboration on this issue, but as the D7 version is no longer supported, we will now close all D7 issues to keep the issue queue a bit tidier. This information won't go anywhere, it just won't show up on the list of open issues anymore.

Please see: https://www.drupal.org/project/group/issues/3163655 and https://www.drupal.org/project/group/issues/3203863#comment-14100281 for more details.