Bug #17569
closedNo notification mails will be sent on using user groups
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)
Files
Updated by Patrick Rodacker almost 17 years ago
added a patch to receive emails for users of the assigned backend usergroups and the assigend users entries.
Updated by Martin Kutschker almost 17 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 over 16 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 Administrator Admin over 15 years ago
If the patch is already applied ?
It's quite strange to see not applied patch 2 years old.
Updated by Benni Mack over 13 years ago
- File 17569.patch 17569.patch added
- Category deleted (
Miscellaneous) - Target version deleted (
0)
Attached patch works for TYPO3 4.5.x - sent to review.
Updated by Benni Mack over 13 years ago
- Status changed from Accepted to Under Review
Updated by Oliver Hader over 13 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 over 13 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 over 13 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 over 13 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 Ernesto Baschny over 12 years ago
- Target version deleted (
4.5.6)
Not targeting any specific TYPO3 version yet
Updated by Michael Stucki almost 11 years ago
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces
Updated by Wouter Wolters almost 10 years ago
- Status changed from Under Review to Closed
- Is Regression set to No
Benjamin Mack Aug 27 11:41
Abandoned
dropped