dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Administrator reports + Metadata Queries: Communities appear in the Collection Selector but can not be selected

Open tinsch opened this issue 7 months ago • 5 comments

Describe the bug

When using the Metadata Query feature of the Administrator report, a list of both collections and communities is shown in the "Collection selector" drop-down menu. The communities can not be selected, and it appears as if you cannot select anything when a lot of communities are shown at the beginning of the list. Observed on Sandbox during Testathon (10.0) as well as on Demo (9.x)

Image

To Reproduce

Login on the sandbox site as an admin

  1. Open the Reports -> Metadata query
  2. Try to select something under "Collection Selector"

Expected behavior

I would assume no communities should be shown in the collection selector list. The feature documentation can be found here: https://wiki.lyrasis.org/pages/viewpage.action?pageId=408945575

Related work

Kent Gerber and Marcella Huggard initially reported this issue in the testathon test document.

tinsch avatar Apr 22 '26 17:04 tinsch

Thank you for creating this ticket @tinsch! Verified that this is occurring on demo.dspace.org as well, so would be good to backport a fix if possible.

lgeggleston avatar Apr 22 '26 18:04 lgeggleston

What we're trying to show here seems to be a path through a tree (the communities) plus the leaves at the end of that path (the collections). We could use a tree widget with all expandable nodes disabled. But it might be semantically better to separate the path from the list of leaves that are actually selectable.

If we want to get fancy, the path might be initially collapsed to its last element, expandable if the user wants more context.

mwoodiupui avatar Apr 23 '26 15:04 mwoodiupui

This was discussed during today's Developer meeting. As Mark notes, it sounds like this was the original behavior and was intended to show the tree structure, but that is of course very unclear with the current display.

One way to clarify the selector display would be to model this on other existing Collection selectors, for example the Edit item modal (showing only collections as options, but including community information above or in a tooltip).

lgeggleston avatar Apr 23 '26 17:04 lgeggleston

I've validated this bug and am reviewing and testing possible solutions. Based on the discussion above, I've been exploring modeling the Collection Selector after the existing pattern used in the Edit Item modal — showing only collections as selectable options while preserving the community context above or via tooltip, rather than listing communities as selectable (but disabled) entries.

I've been investigating the component(s) behind both selectors (Metadata Query report vs. Edit Item modal) to confirm whether the existing dso-selector pattern can be reused directly, or whether a dedicated tree-based approach (as suggested by @mwoodiupui ) would fit better here.

I'd like to contribute a PR once I have a working solution in place.

shernandez-dev avatar Jun 30 '26 15:06 shernandez-dev

@shernandez-dev Thank you for volunteering! The approach you outlined sounds like a good place to start, and I've assigned you to the ticket to mark that you're starting work on it.

lgeggleston avatar Jun 30 '26 21:06 lgeggleston