[ 
https://jira.duraspace.org/browse/DS-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Dietz updated DS-1416:
----------------------------

    Status: Open  (was: Received)

I can confirm this bug, it affects 1.8, and 3.0.

When using the "Original Workflow", leaving the new "XML Workflow" disabled, 
this breaks. It looks like the code to processDeleteCollectionRole in 
FlowContainerUtils is hard-coded to trigger the XML-Workflow code, as opposed 
to the Original Workflow code.
                
> NPE when removing roles from Collection workflow steps
> ------------------------------------------------------
>
>                 Key: DS-1416
>                 URL: https://jira.duraspace.org/browse/DS-1416
>             Project: DSpace
>          Issue Type: Bug
>          Components: DSpace API, XMLUI
>    Affects Versions: 3.0
>            Reporter: Ian Boston
>
> In the XMLUI
> If I edit a collection
> Add a role to a workflow step clicking create.
> Add a user to that role.
> save
> then delete the role from the workflow step.
> I get the following NPE:
> java.lang.NullPointerException
> at 
> org.dspace.xmlworkflow.WorkflowUtils.deleteRoleGroup(WorkflowUtils.java:215)
> at 
> org.dspace.app.xmlui.aspect.administrative.FlowContainerUtils.processDeleteCollectionRole(FlowContainerUtils.java:538)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
> at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
> at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237)
> The method is:
>   public static void deleteRoleGroup(Context context, Collection collection, 
> String roleID) throws SQLException, IOException, 
> WorkflowConfigurationException {
>         Workflow workflow = WorkflowFactory.getWorkflow(collection);
>         Role role = workflow.getRoles().get(roleID);
> Line: 215>>>>>>> NPE on role        if(role.getScope() == 
> Role.Scope.COLLECTION){
>             CollectionRole ass = CollectionRole.find(context, 
> collection.getID(), roleID);
>             ass.delete();
>         }
>     }
> You could do
> if ( role != null && role.getScope() ... 
> but role should not be null ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to