Bug #17569

No notification mails will be sent on using user groups

Added by Thomas over 5 years ago. Updated 10 months ago.

Status:Under Review Start date:2007-08-30
Priority:Should have Due date:
Assignee:Benjamin Mack % Done:

0%

Category:-
Target version:-
TYPO3 Version:4.1 PHP Version:
Votes: 0

Description

The workspace allows to add
a) users
b) groups
to be members or reviewers of a workspace.

When a WS state changes and t3lib_TCEMain::notifyStageChange() is triggered, the method can hence pass either a list of BE users or groups or both to the method notifyStageChange_getEmails($listOfUsers,$noTablePrefix=FALSE) which only accepts a list of users.

@see line 5895:
The value of $workspaceRec['reviewers'] could also be a list of groups (or mixed groups,users):
$emails = $this->notifyStageChange_getEmails($workspaceRec['reviewers']);

Tested with 4.1.2

(issue imported from #M6239)

0006239.patch (2.6 kB) Administrator Admin, 2007-12-12 16:32

0006239_v2.patch (2.3 kB) Administrator Admin, 2008-03-02 22:42

17569.patch (3.8 kB) Benjamin Mack, 2011-05-12 04:34


Related issues

related to Workspaces & Versioning - Bug #20557: Notification emails are send to assigned users only, not ... Closed 2009-06-03

History

Updated by Patrick Rodacker over 5 years ago

added a patch to receive emails for users of the assigned backend usergroups and the assigend users entries.

Updated by Martin Kutschker over 5 years ago

Patrick, there is a problem (because it is confusing) is that $users is used for two distinct data sets: an array of user IDs and a PREF match array.

This can be amened easily:

if (!$noTablePrefix) {
preg_match_all('/be_groups_([0-9]+)/', $listOfEntries, $match_groups);
preg_match_all('/be_users_([0-9]+)/', $listOfEntries, $match_users);
$groups = $match_groups1;
$users = $match_users1;
} else {
$groups = array();
$users = t3lib_BEfunc::trimExplode(',',$listOfEntries,1);
}

Test:

php -r 'preg_match_all("/be_users_([0-9]+)/","be_users_1,be_groups_5,be_users_2",$match);print_r($match);'

Now you have always an array (may be empty) for $users and $groups always containing a list of IDs (without the table prefix).

Please change this as this will make the code much more readable.

Updated by Patrick Rodacker about 5 years ago

Hi Martin,

I have applied the your suggestions and refactored the code a little bit. Please have a look and let me know if this is ok with you.

Recent patch is 0006239_v2.patch

Updated by Matthias Stübner almost 4 years ago

see also issue 0011255

Updated by Administrator Admin almost 4 years ago

If the patch is already applied ?
It's quite strange to see not applied patch 2 years old.

Updated by Benjamin Mack about 2 years ago

  • File 17569.patch added
  • Category deleted (Default)
  • Target version deleted (0)

Attached patch works for TYPO3 4.5.x - sent to review.

Updated by Benjamin Mack about 2 years ago

  • Status changed from Accepted to Under Review

Updated by Oliver Hader almost 2 years ago

  • Subject changed from notifyStageChange() does not send emails, if groups are added to WS members/reviewers to No notification mails will be sent on using user groups

Updated by Mr. Hudson almost 2 years ago

Patch set 2 of change I099e6132cd4698b886cae3c837c0cae80c318b46 has been pushed to the review server.
It is available at http://review.typo3.org/2088

Updated by Mr. Hudson almost 2 years ago

Patch set 3 of change I099e6132cd4698b886cae3c837c0cae80c318b46 has been pushed to the review server.
It is available at http://review.typo3.org/2088

Updated by Mr. Hudson almost 2 years ago

Patch set 4 of change I099e6132cd4698b886cae3c837c0cae80c318b46 has been pushed to the review server.
It is available at http://review.typo3.org/2088

Updated by Tolleiv Nietsch almost 2 years ago

  • Target version set to 4.5.6

Updated by Ernesto Baschny 10 months ago

  • Target version deleted (4.5.6)

Not targeting any specific TYPO3 version yet

Also available in: Atom PDF