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

Default form is displayed for a Publication when I specified a proper submission-name #9402

Closed
paulo-graca opened this issue Mar 7, 2024 · 2 comments · Fixed by #9478
Closed
Labels
bug component: configurable entities Related to Configurable Entities feature component: submission Related to configurable submission system testathon Reported by a tester during Community Testathon
Milestone

Comments

@paulo-graca
Copy link
Contributor

Describe the bug
Not all collections are being presented the correct configured form.
It you have such a configuration like this in you item-submission.xml file:

<name-map collection-entity-type="Publication" submission-name="Publication" />

And have more than 10 collections with dspace.entity.type = Publication the 11th will not display the correct form. It will use the default one.

To Reproduce
Steps to reproduce the behavior:

  1. You will need more than 10 collections with dspace.entity.type = Publication (or any other type)
  2. Add more collections and associate the Publication type
  3. Deposit one new item on a recent collection

Expected behavior
I'm expecting to have the correct form. But the default is shown.

Related work

@paulo-graca paulo-graca added bug needs triage New issue needs triage and/or scheduling labels Mar 7, 2024
@paulo-graca paulo-graca self-assigned this Mar 7, 2024
@paulo-graca
Copy link
Contributor Author

This issue is related with this line:
https://github.com/DSpace/DSpace/blob/main/dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java#L1122

DiscoverResult discoverResult = searchService.search(context, discoverQuery);

because we didn't specify a number of expected rows. So the results with the default number of rows (I seems to be 10) are returned.

Two possible approaches could be addressed. The easy one is to define an high number for the returned rows (but this problem will again occur if that number exceeds). The other one is to loop every page result. Perhaps we can define a high number and do pagination so we don't have to do several or many solr queries.

@tdonohue tdonohue added component: submission Related to configurable submission system component: configurable entities Related to Configurable Entities feature and removed needs triage New issue needs triage and/or scheduling labels Mar 8, 2024
@tdonohue
Copy link
Member

tdonohue commented Mar 8, 2024

@paulo-graca : I'd like to note a third option is to make that method support pagination similar to findCollectionsWithSubmit() here: https://github.com/DSpace/DSpace/blob/main/dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java#L1085-L1099

Essentially, any methods which can return a large number of results ideally should support pagination parameters. That way the calling code can paginate through the results (or grab all results if it needs it). In this scenario, that'd be better than an arbitrary large number...plus it could allow for better scalability as you may not need/want to load 1000 Collection objects into memory at one time even if you have 1000 Collection objects that match an entity type.

In any case, I agree this is definitely a bug. Pulled this over to the 7.6.x maintenance board & keeping assigned to you (thanks for volunteering!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: configurable entities Related to Configurable Entities feature component: submission Related to configurable submission system testathon Reported by a tester during Community Testathon
Projects
2 participants