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

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) #11179

Open
jggautier opened this issue Jan 22, 2025 · 1 comment

Comments

@jggautier
Copy link
Contributor

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 Add validation for entered coordinate values in Geospatial metadata (bounding boxes, etc) #9547 and in Add validation for entered coordinate values in Geospatial metadata #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.

@qqmyers
Copy link
Member

qqmyers commented Jan 22, 2025

What's the scope here? On demo, I can add a box with east=west and north=south and the dataset seems to be indexed correctly. Is more needed than editing

dataset.metadata.invalidGeospatialCoordinates=has invalid coordinates. East must be greater than West and North must be greater than South. Missing values are NOT allowed.
to add "or equal" twice?

(FWIW: I noticed the tips for the block itself don't include the constraint - they say, for example,
Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180.0 <= East Bounding Longitude Value <= 180.0.
vs
Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180.0 <= West Bounding Longitude <= East Bounding Longitude Value <= 180.0.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants