[MAGNOLIA-1714] Workflow can't send emails to ALL members of a group with class MgnlMailFactory Created: 03/Sep/07 Updated: 15/May/13 Resolved: 03/Sep/07 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 3.0.3 |
| Fix Version/s: | 3.0.4, 3.5 RC1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jürgen Hirt | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
There's still a bug in that class when an email has to be sent to all members of a group. Look at the code: ... userName = StringUtils.removeStart(userName, MailConstants.PREFIX_GROUP); try { HierarchyManager hm = ContentRepository.getHierarchyManager(ContentRepository.USERS); Collection users = hm.getRoot().getChildren(ItemType.USER); Iterator iter = users.iterator(); while(iter.hasNext()){ Content userNode = ((Content) iter.next()); MgnlUserManager manager = new MgnlUserManager(); MgnlUser user = (MgnlUser) manager.getUser(userNode.getName()); if (user.getGroups().contains(userName)) { ret.append(getUserMail(user.getName())); }
} the command just concatinates the adresses. Therefore in the end you have just only one big WRONG email address like, e.g.: ...and finally: it doesn't work! |
| Comments |
| Comment by Jürgen Hirt [ 03/Sep/07 ] |
|
see |
| Comment by Magnolia International [ 03/Sep/07 ] |
|
fixed in trunk. |
| Comment by Jürgen Hirt [ 03/Sep/07 ] |
|
Thanx ! Is it possible that this fix could also be availble in v3.0.4, and not in v3.1 of magnolia ? btw: I looked at your modification, doesn't it produce any problems when even after the last address of the list a '\n' is appended ? |
| Comment by Magnolia International [ 03/Sep/07 ] |
|
It's safe because the method parsing this list thereafter will strip whitelines. I'll commit to the 3.0 branch in a minute. |
| Comment by Magnolia International [ 03/Sep/07 ] |
|
fix merged to magnolia-3.0 branch |