You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If an advanced workflow (eg not the defaultWorkflow with the list of standard steps) is mapped to a collection in workflow.xml, the workflowGroups iterable that is expected to populate the collection _links is broken and causes the "Assign Roles" page to break.
There are probably other bugs associated with this,
This can produce either a "is not Iterable" error in angular or a "is not defined" error if multiple mappings are made to the same collection (though perhaps this use case is out of scope anyway)
Reported by Damian Józefowski
To Reproduce
Steps to reproduce the behavior:
Set up mapping like <entry key="123456789/20" value-ref="selectSingleReviewer"/> where the handle matches a valid collection
Log in as administrator, edit the collection and visit Assign Roles. The page will not show any groups and the console will show an error.
Inspect API output for the collection - compare the workflowGroups link in this collection compared to a collection with default workflow
Expected behavior
The workflowGroups link should contain an array with all workflow groups associated with advanced workflow steps for this collection.
I think this was introduced with a change in late 2020. I think some workaround in the CollectionResourceWorkflowGroupHalLinkFactory.addLinks method could be used so that if there are 0 or 1 roles returned, it forces them into a list? That way at least every downstream consumer can still expect an iterable and doesn't need to implement their own workarounds. That's where I think the problem is.
The text was updated successfully, but these errors were encountered:
So, I think we might be able to close this ticket as the issue is that this feature hasn't been implemented yet in 7.x. It's in our "Tier 3" list of tasks though, which we will likely start implementing for 7.4 -- if you are interested let me know!
Describe the bug
If an advanced workflow (eg not the defaultWorkflow with the list of standard steps) is mapped to a collection in
workflow.xml
, the workflowGroups iterable that is expected to populate the collection_links
is broken and causes the "Assign Roles" page to break.There are probably other bugs associated with this,
This can produce either a "is not Iterable" error in angular or a "is not defined" error if multiple mappings are made to the same collection (though perhaps this use case is out of scope anyway)
Reported by Damian Józefowski
To Reproduce
Steps to reproduce the behavior:
<entry key="123456789/20" value-ref="selectSingleReviewer"/>
where the handle matches a valid collectionworkflowGroups
link in this collection compared to a collection with default workflowExpected behavior
The
workflowGroups
link should contain an array with all workflow groups associated with advanced workflow steps for this collection.I think this was introduced with a change in late 2020. I think some workaround in the
CollectionResourceWorkflowGroupHalLinkFactory.addLinks
method could be used so that if there are 0 or 1 roles returned, it forces them into a list? That way at least every downstream consumer can still expect an iterable and doesn't need to implement their own workarounds. That's where I think the problem is.The text was updated successfully, but these errors were encountered: