Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection "workflowGroups" link is broken if Advanced Workflow workflows are defined #8328

Closed
kshepherd opened this issue Jun 2, 2022 · 2 comments
Labels
bug needs triage New issue needs triage and/or scheduling

Comments

@kshepherd
Copy link
Member

kshepherd commented Jun 2, 2022

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:

  1. Set up mapping like <entry key="123456789/20" value-ref="selectSingleReviewer"/> where the handle matches a valid collection
  2. 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.
  3. 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.

@kshepherd kshepherd added bug needs triage New issue needs triage and/or scheduling labels Jun 2, 2022
@tdonohue
Copy link
Member

tdonohue commented Jun 2, 2022

@kshepherd : I think this is because we haven't yet implemented #2841 or DSpace/dspace-angular#770

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!

@kshepherd
Copy link
Member Author

Thanks yes I'll close this issue. It's not clear how much is working/broken but I'll have a closer look at those tickets later, closing this now.

@kshepherd kshepherd closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
DSpace Backlog (OLD - Migrated, see note above) automation moved this from Triage to Done Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage New issue needs triage and/or scheduling
Projects
Status: Done / Closed
Development

No branches or pull requests

2 participants