Components:
OGEmail.info
OGEmail.module
OGEmail.rules.inc

Category:
Rules/Tokens

Title:
Rules Action: OG Roles and Tokens

Link to project sandbox:
http://drupal.org/sandbox/hanoverhr/1115916

Description:
This module extends rules by adding an action which allows any new node created in a group (or workflow change) to send notices to specific roles of that group. Additionally, two new tokens have been added [node:groups] and [node:group_names]. This module is good-to-go out of the box -- no specific configuration is required (one option -- see below). Just activate!
[node:groups] Will return each group_id where a node exists in more than one group (allowing notification to be sent to roles within each group)
[node:group_names] Returns the group_name for each group wherein a node exists.

NOTE:In addition to a rule action and two token additions, enhancement to standard rules modules comes in the special functionality which also exists to place this rule in "test" mode, where instead of sending messages (email) to roles within a group, email is instead sent to a list of emails stored inside a specific node. This can be used as a shortcut method for contacting specific, non-OG related users if an override is desired (extends functionality to beyond OG roles).

To change the hard-wired "return" email address in the code, modify line 74 in the OGEmails.rules.inc. This is not strictly required, as the module will operate without any changes. However, the default is set to 'web_support@yoursite.gov'.
http://drupal.org/sandbox/hanoverhr/1115916

CommentFileSizeAuthor
#1 OG_Rules.zip4.82 KBhanoverhr

Comments

hanoverhr’s picture

StatusFileSize
new4.82 KB

Completed verification through coder. Was left with four errors that really are not fixable, as they don't represent errors as much as mistakes in the coder interpretation of the module. Those errors were:

OGEmail.module

* severity: normal
Line 40: string concatenation should be formatted with a space separating the operators (dot .) and
non-quote terms

$GroupName=$GroupName.$WhatName[1]['title'] .', ';

*severity: normal
Line 43: string concatenation should be formatted with a space separating the operators (dot .) and
non-quote terms

$Groups=$Groups.$Gotcha[1]['group_nid'] .',';

OGEmail.rules.inc

* severity: normal
Line -1: Include the CVS keyword $Id$ in each file. This should be in the format // $Id$ or // $Id$
(Drupal Docs)

*severity: normal
Line 20: Functions should be called with no spaces between the function name and opening
parentheses

'ogemail_action_mail_to_users_of_group' => array (

Open to suggestions if something specific needs to be done, however, these appear to be more mis-reading by coder than actual problems in the code.

Sean

hanoverhr’s picture

Status: Active » Needs review
hanoverhr’s picture

Component: new project application » module
Status: Needs review » Active

Could a moderator please review this? It's been in the queue for over a month and a half!

Thanks!

Sean

sreynen’s picture

Status: Active » Needs review

The status should be "needs review." Sorry, I'm not doing reviews right now, only cleanup like this. Hopefully someone will get to this soon, but there's a pretty big back log.

svendecabooter’s picture

Priority: Normal » Critical

Marking as critical as per http://drupal.org/node/894256
Sorry for the long wait.

hanoverhr’s picture

Still hoping for someone out there to clear me.... :)

hanoverhr’s picture

Help! Someone PLEASE review this?

klausi’s picture

Priority: Critical » Normal
Status: Needs review » Postponed (maintainer needs more info)

* Have you tried to include your changes to the Organic Groups module directly? I would like to see a link to an issue in the og queue here where this is discussed.
* just looked at the code briefly, there are many code style issues. Please read the coding standards drupal.org/node/318 and take a look at the coder module that will show you code style errors http://drupal.org/project/coder

misc’s picture

@hanoverhr has been contacted to ask if the application is abandoned.

Also there sem to be a problem with Git user attribution in the sandbox. Some problem with ssh key?

hanoverhr’s picture

Status: Postponed (maintainer needs more info) » Needs review

I'll look into they key problem...interesting. It's been so long.

I am not trying to merge this with OG. That's crazy. It offers folks the opportunity to create nodes to control rule flow -- it touches OG obviously, but this is decidedly NOT an OG patch is not being offered as such.

The comment about coding makes no sense. Did this person, kluasi, even read the notes here? This module was run through coder already -- months ago -- and the results are posted here. Be more specific, please.

Thanks!

S

misc’s picture

Status: Needs review » Needs work

I know it could be frustrating with this application process, but it I think it is needed to make Drupal sustainable. I also personally think that you you should keep good manners towards other users. Otherwise you will really get problem if nobody wants to review your application.

Some manual review:

  • Comments exceeds 80 characters in several places
  • Comments should follow doxygen standards
  • One of your files (OGEmail.rules.inc) have a ?> in the end, and the .module several newlines and unneeded tabs.
  • You need to remove all old CVS $Id tags
  • Your file names should be lowercase except README.txt
  • Table names are missing {}, that breaks the module if you are using prefixed table names.
  • I have some problems in understanding this usage:$Gotcha[1]=db_fetch_array($Result), but I am not a code guru, so maybe I am missing something :-).

There a quite a lot errors in the automatic code review, so that is relevant: http://ventral.org/pareview/httpgitdrupalorgsandboxhanoverhr1115916git

EDIT: Ups, some errors in my review, sorry.

misc’s picture

Also, forgot - you are working in the Master branch - you should not do that, you should work in a 6.x-1.x branch, and only leave a README.txt with information about the correct branch in it.

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.