Skip to content

Conversation

@aliassheikh
Copy link
Contributor

@aliassheikh aliassheikh commented Dec 3, 2025

DD-2075: Hidden fields of a dataset creation form remain visible AND setting a field to 'hidden' is not working #11992

What this PR does / why we need it:

We are in the process of upgrading to version 6.7.1.
While testing, I noticed that if I set a field (in this case from the citation block) to hidden, this does not apply.
These are the steps I followed:

  • Create a new dataverse
  • Set the fields 'Series' and 'related material' to hidden by unchecking the checkboxes.
  • Click done.
  • Click 'save changes'.
  • Add a dataset. I expected these fields not to be visible when creating a new one, but I still see them.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@janvanmansum
Copy link
Contributor

@qqmyers : would you have a look at this?

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Dec 3, 2025
@coveralls
Copy link

Coverage Status

coverage: 24.184%. remained the same
when pulling fe42efb on DANS-KNAW:DD-2075-IQSS-11992
into 0ee4268 on IQSS:develop.

<ui:repeat value="#{metadataBlockVal.value}" var="dsf" varStatus="curField">
<div class="form-group" role="group"
jsf:rendered="#{((editMode == 'METADATA' or dsf.datasetFieldType.shouldDisplayOnCreate() or !dsf.isEmpty() or dsf.required or dsf.hasRequiredChildren)) or (!datasetPage and dsf.include)}">
jsf:rendered="#{((editMode == 'METADATA' or dsf.datasetFieldType.shouldDisplayOnCreate() or !dsf.isEmpty() or dsf.required or dsf.hasRequiredChildren) and dsf.include) or (!datasetPage and dsf.include)}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested but this seems odd - if dsf.isEmpty() is false (there is a value), we wouldn't display it if dsf.include is false? Should it be "or dsf.include" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix was done here by comparing the statement with it before modification in 6.7 and set back 'and dsf.include' in the statement. To avoid any regression, nothing else is changed in this fix.

6.5

jsf:rendered="#{(
                (editMode == 'METADATA' or dsf.datasetFieldType.displayOnCreate        or !dsf.isEmpty() or dsf.required) and dsf.include)
                or (!datasetPage and dsf.include)}">

6.7

jsf:rendered="#{(
                (editMode == 'METADATA' or dsf.datasetFieldType.shouldDisplayOnCreate() or !dsf.isEmpty() or dsf.required or dsf.hasRequiredChildren))
                or (!datasetPage and dsf.include)}">

fix:

jsf:rendered="#{(
                (editMode == 'METADATA' or dsf.datasetFieldType.shouldDisplayOnCreate() or !dsf.isEmpty() or dsf.required or dsf.hasRequiredChildren) and dsf.include)
                or (!datasetPage and dsf.include)}">

@scolapasta scolapasta moved this from Ready for Triage to In Review 🔎 in IQSS Dataverse Project Dec 9, 2025
@cmbz cmbz added FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) labels Dec 17, 2025
@cmbz cmbz added the FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) label Dec 31, 2025
@qqmyers qqmyers added the Waiting label Jan 5, 2026
@jggautier jggautier changed the title DD-2075: Hidden fields of a dataset creation form remain visible AND Setting a field to 'hidden' is not working #11992 DD-2075: Hidden fields of a dataset creation form remain visible AND setting a field to 'hidden' is not working #11992 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) Waiting

Projects

Status: In Review 🔎

Development

Successfully merging this pull request may close these issues.

Setting a field to 'hidden' is not working

5 participants