IQSS / IQSS/dataverse

Geographic Bounding Box validation error message doesn't reflect all validation rules (e.g. message reads that East number must be greater than West, North number must be greater than South, but Dataverse accepts equal numbers)

Open
#11,179 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What steps does it take to reproduce the issue?

  • When does this issue occur?
    When trying to save a dataset that has invalid metadata in any set of Geographic Bounding Box fields and when using the validation error message to review the validity of metadata in those fields

  • Which page(s) does it occurs on?
    On the dataset edit page

  • What happens?
    When trying to save a dataset that has invalid metadata in a Geographic Bounding Box, the validation error message tells users that "East must be greater than West and North must be greater than South." But the dataset can be saved when the metadata doesn't follow that rule. That is when:

    • the number in the Easternmost (Right) Longitude field is equal to the number in the Westernmost (Left) Longitude field
    • the number in the Northernmost (Top) Latitude field is equal to the number in the Southernmost (Bottom) Latitude field

    In https://github.com/IQSS/dataverse/issues/9547 and in https://github.com/IQSS/dataverse/pull/10142, @landreev wrote that when East equals West and when North equals South, Dataverse should consider the Geographic Bounding Box as valid. So it's intended that equal West and East are valid and equal North and South are valid, despite what the validation error message tells users.

    For example, see the Geographic Bounding Box metadata of the dataset at https://doi.org/10.7910/DVN/WOBTGG (as of Jan 22, 2025), where "East" equals "West" and "North" equals "South", the dataset doesn't have the "Incomplete metadata" label and isn't returned in a search for "valid datasets" in the collection (https://dataverse.harvard.edu/dataverse/worldfish?q=datasetValid:false)

  • To whom does it occur (all users, curators, superusers)?
    Curators, superusers, depositors

  • What did you expect to happen?
    The validation error message reflects all validation rules, including that East and West can be equal and that North and South can be equal.

Which version of Dataverse are you using?
v6.3 and v6.5

Any related open or closed issues to this bug report?

Screenshots:
Validation error message for Geographic Bounding Box fields

Image

Dataverse considers this metadata as valid even though the validation error tells users that "East must be greater than West and North must be greater than South."

Image

Are you thinking about creating a pull request for this issue?
Maybe, depending how this is resolved. I'm happy to help investigate more and adjust the validation error text if we decide to do that.

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 at the dataset edit page's Geographic Bounding Box validation and review related issue #9547 and pull request #10142. Confirm the message matches the existing rules, then update its wording and verify that invalid metadata still reports an error while equal coordinates are accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.