IQSS / IQSS/dataverse

Metadata field "displayFormat" is wrongly applied to facet values

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

Nobody has claimed this yet.

Original 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?

  1. Have a metadata block activated which contains at least one facetable field with a non-default displayFormat, e.g.

    • authorAffiliation in the citation block is facetable and has display format (#VALUE)
    • city in the geospatial block is facetable and has display format #VALUE,
  2. Have a collection with that facet turned on

  3. Create a dataset with a value in that facetable field

  4. View the facets on the collection page, which look odd due to superfluous commas or parentheses:

    1. city: Image

      (see here: https://demo.dataverse.org/dataverse/veratest)

    2. authorAffiliation: Image

    3. The field topicClassification includes double parentheses, not sure why, but I think it might also be related:

      Image

      (see here: https://demo.dataverse.org/)

Which version of Dataverse are you using?

v6.8 and v6.9

Any related open or closed issues to this bug report?

Did not find any open issues.

I think the bug was introduced by https://github.com/IQSS/dataverse/pull/11750 with this code change:

Image

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

Possibly yes

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 by reviewing the displayFormat change in pull request #11750 and reproduce the issue on the collection page using facetable city or authorAffiliation fields from the citation or geospatial metadata blocks. Done means facet values render without the metadata field's extra commas or parentheses, including checking topicClassification for the reported double parentheses.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.