mirror of
https://github.com/sismics/docs.git
synced 2024-11-24 22:57:56 +01:00
Fixed sending workflow emails to previous assignee (#422)
This commit is contained in:
parent
e474e7cd75
commit
35339f7328
@ -209,7 +209,9 @@ public class RouteResource extends BaseResource {
|
||||
routeStepDao.endRouteStep(routeStepDto.getId(), routeStepTransition, comment, principal.getId());
|
||||
RouteStepDto newRouteStep = routeStepDao.getCurrentStep(documentId);
|
||||
RoutingUtil.updateAcl(documentId, newRouteStep, routeStepDto, principal.getId());
|
||||
RoutingUtil.sendRouteStepEmail(documentId, routeStepDto);
|
||||
if (newRouteStep != null) {
|
||||
RoutingUtil.sendRouteStepEmail(documentId, newRouteStep);
|
||||
}
|
||||
|
||||
JsonObjectBuilder response = Json.createObjectBuilder()
|
||||
.add("readable", aclDao.checkPermission(documentId, PermType.READ, getTargetIdList(null)));
|
||||
|
@ -226,7 +226,7 @@ public class TestRouteResource extends BaseJerseyTest {
|
||||
.param("transition", "APPROVED")), JsonObject.class);
|
||||
Assert.assertFalse(json.containsKey("route_step"));
|
||||
Assert.assertTrue(json.getBoolean("readable")); // Admin can read everything
|
||||
Assert.assertTrue(popEmail().contains("workflow step"));
|
||||
Assert.assertNull(popEmail()); // Last step does not send any email
|
||||
|
||||
// Get the route on document 1
|
||||
json = target().path("/route")
|
||||
|
Loading…
Reference in New Issue
Block a user