mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 21:43:11 +00:00
DS-28DS-2895 add unit test to expose the wrong behaviour
slightly renamed the method isAnInprogressSubmission in isInProgressSubmission to make it uniform with DSpace 5 and added to the service interface to allow testing and easy reuse
This commit is contained in:
@@ -887,7 +887,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
// is this collection not yet created, and an item template is created
|
||||
if (item.getOwningCollection() == null)
|
||||
{
|
||||
if (!isAnInprogressSubmission(context, item)) {
|
||||
if (!isInProgressSubmission(context, item)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@@ -905,7 +905,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
||||
* @return <code>true</code> if the item is an inprogress submission, i.e. a WorkspaceItem or WorkflowItem
|
||||
* @throws SQLException
|
||||
*/
|
||||
public boolean isAnInprogressSubmission(Context context, Item item) throws SQLException {
|
||||
public boolean isInProgressSubmission(Context context, Item item) throws SQLException {
|
||||
return workspaceItemService.findByItem(context, item) != null
|
||||
|| workflowItemService.findByItem(context, item) != null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user