[DuraSpace JIRA] (DS-4581) If a single email in a workflowgroup is invalid, the whole group emailing fails

0 views
Skip to first unread message

Hrafn Malmquist (LYRASIS JIRA)

unread,
Jun 1, 2021, 4:57:02 PM6/1/21
to dspace-...@googlegroups.com
Hrafn Malmquist created an issue
 
DSpace / Bug DS-4581
If a single email in a workflowgroup is invalid, the whole group emailing fails
Issue Type: Bug Bug
Affects Versions: 6.3, 7.0
Assignee: Hrafn Malmquist
Components: API
Created: 01/Jun/21 3:56 PM
Priority: Medium Medium
Reporter: Hrafn Malmquist

The method notifyGroupOfTask of the class BasicWorkflowService has a try catch the outside the for loop that iterates through ePersons.

It catches a MessagingException and logs a warning (should be an error IMO) f. example:

2021-06-01 15:25:08,374 WARN org.dspace.workflowbasic.BasicWorkflowServiceImpl @ *****@**:session_id=36E4D2106AB8E57280CFF8C6F198FCDC:notifyGroupofTask:cannot email user group_id=e16fefea-cef9-4ee5-8fbb-91006947b296 workflow_item_id=21105\colon; Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException\colon; 550 5.1.1 <****@*********>... User unknown

This means that if there is a single ePerson in the group with an email that is deleted then only those in the group that are iterated before the user with a deleted email will be notified.

There is a simple fix for this, to have the try catch inside the for loop. I will provide a PR.

https://github.com/DSpace/DSpace/blob/b574fb141a9424d3d0776647b0fcba01173fd837/dspace-api/src/main/java/org/dspace/workflowbasic/BasicWorkflowServiceImpl.java#L995-L1065

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Hrafn Malmquist (LYRASIS JIRA)

unread,
Jun 2, 2021, 7:49:01 AM6/2/21
to dspace-...@googlegroups.com
Hrafn Malmquist updated an issue
Change By: Hrafn Malmquist
The method notifyGroupOfTask of the class BasicWorkflowService has a try catch the outside the for loop that iterates through ePersons.

It catches a MessagingException and logs a warning (should be an error IMO) f. example:

2021-06-01 15:25:08,374 WARN  org.dspace.workflowbasic.BasicWorkflowServiceImpl @ ******@****:session_id=36E4D2106AB8E57280CFF8C6F198FCDC:notifyGroupofTask:cannot email user group_id=e16fefea-cef9-4ee5-8fbb-91006947b296 workflow_item_id=21105\colon;  Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException\colon; 550 5.1.1 <******@**********>... User unknown


This means that if there is a single ePerson in the group with an email that is deleted then only those in the group that are iterated before the user with a deleted email will be notified.

There is a simple fix for this, to have the try catch inside the for loop. I will provide a PR.

https://github.com/DSpace/DSpace/blob/b574fb141a9424d3d0776647b0fcba01173fd837/dspace-api/src/main/java/org/dspace/workflowbasic/BasicWorkflowServiceImpl.java#L995-L1065


NOTE

This seems to be specific to a certain email server configuration.

Anonymous (LYRASIS JIRA)

unread,
Jun 3, 2021, 9:41:01 PM6/3/21
to dspace-...@googlegroups.com
Issue was automatically transitioned when Hrafn Malmquist created pull request #3296 in GitHub
Change By: Hrafn Malmquist
Status: Received Code Review Needed
Reply all
Reply to author
Forward
0 new messages