IQSS / IQSS/dataverse

`allowHarvestingMissingCVV` value not updated via PUT `/api/harvest/clients/{nickName}` endpoint

Open
#12,075 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Description

When updating a harvesting client via the PUT endpoint /api/harvest/clients/{nickName}, the allowHarvestingMissingCVV field is not being retrieved from the JSON request body and therefore not persisted in the database.

Steps to Reproduce
  1. Create a harvesting client via the API or UI
  2. Attempt to update the client using PUT /api/harvest/clients/{nickName} with allowHarvestingMissingCVV set to a different value
  3. Retrieve the client configuration and observe that allowHarvestingMissingCVV has not been updated
Expected Behavior

The allowHarvestingMissingCVV value should be retrieved from the JSON request body and updated in the harvesting client configuration.

Actual Behavior

The allowHarvestingMissingCVV value is ignored during the PUT request. The field value remains unchanged.

Root Cause Analysis

In HarvestingClients.java, the modifyHarvestingClient() method does not extract the allowHarvestingMissingCVV value from the incoming JSON object, unlike other fields such as harvestUrl, archiveUrl, etc.

Version
  • Dataverse 6.9
Relevant Code
  • File: src/main/java/edu/harvard/iq/dataverse/api/HarvestingClients.java
  • Method: modifyHarvestingClient() (PUT handler)
Are you thinking about creating a pull request for this issue?

No fix is currently planned by the team.

Contributor guide

Open the contributing guide

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.

Research direction

Start in src/main/java/edu/harvard/iq/dataverse/api/HarvestingClients.java, at the modifyHarvestingClient() PUT handler, and compare its JSON field extraction with the other harvesting client fields. Verify the endpoint with a request that changes allowHarvestingMissingCVV, then confirm the updated value is persisted and returned in the client configuration.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.