Posted by Amitaibu on November 25, 2008 at 2:43pm
| Project: | Organic groups |
| Version: | 6.x-2.0 |
| Component: | og.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | rules integration |
Issue Summary
This allows to create a rule that will 'Add new content' and then make this new content a group.
* I had to do some tweaking to og_group_form() in order to use it in the rules settings.
* I haven't been able for some reason, to incorporate the token integration for the 'description' field, but IMO this can come as a follow-up patch.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| og_rules_create_group_node_1.patch | 5.6 KB | Ignored: Check issue status. | None | None |
| Screenshot.png | 38.23 KB | Ignored: Check issue status. | None | None |
Comments
#1
The og.module changes look odd. When would $node->type be empty?
#2
Indeed, re-rolled.
#3
A tab slipped in the patch.
#4
Committed. Thx.
#5
Automatically closed -- issue fixed for two weeks with no activity.
#6
This is cool, but I do not have the option to set the group private. Is this possibly missing in the code from og.rules.inc:
152 /**153 * Action:Add group node settings to content.
154 */
155 function og_rules_action_add_group_node($node, $settings) {
156 if (og_is_group_type($node->type)) {
157 // Add og keys to the node.
158 foreach ($settings['og_fieldset']['og_settings'] as $key => $value){
159 $node->$key = $value;
160 }
161 return array('node' => $node);
162 }
163 }
Or is the private checkbox included in this and something else is going wrong?
#7
Just noticed this was assigned from the creation, sry for not resetting that when writing the bug report.
#8
Adding tag as found on http://drupal.org/project/issues/search?issue_tags=rules%20integration ...