API `/api/dataverses/{identifier}/dataset/linkingDataverses?alreadyLinking=true` returns at most 1 collection

Open Beginner friendly
#12,873 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@vera is already working on this.

Since Nov 5, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
api

Research direction

Start with src/main/java/edu/harvard/iq/dataverse/engine/command/impl/GetLinkingDataverseListCommand.java, especially the loop around lines 95–100 linked in the issue. Trace how it collects unlinkable collections and check the relevant tests for this command or API. Done means the endpoint returns all unlinkable collections when a dataset is linked to more than one.

Written by the indexing model from the issue text.

Description

Type: Bug

What steps does it take to reproduce the issue?

Use /api/dataverses/{identifier}/dataset/linkingDataverses?alreadyLinking=true to request a list of collections to which a dataset is currently linked/can be unlinked from.

The API only returns at most 1 collection, even if there are more.

The loop seems to return too early, see:

https://github.com/IQSS/dataverse/blob/44eec3b74cfca862f56a0fb50c121cb3dc0d5665/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/GetLinkingDataverseListCommand.java#L95-L100

  • What did you expect to happen?

All unlinkable collections to be returned

Which version of Dataverse are you using?

v6.10.1, but bug seems to be present in develop as well

Any related open or closed issues to this bug report?

Did not find any

Are you thinking about creating a pull request for this issue?

Yes

Dominant language
Java
Stars
1.1k
Forks
571
Avg merge
1d 17h
Merged PRs (30d)
11

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IQSS/dataverse

All issues in IQSS/dataverse

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.