You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a new inputfield to an existing custom metdatablock, via the TSV file upload, the Metadata edit and Dataset create forms do respect the configured 'displayorder'. So when adding a new field and giving it an order '0' and renumber the others, the new field is displayed at the top of the metadatablock.
However, the Advanced Search page, does always show this new field at the bottom of the metadatablock.
The function that is responsible for this is findAllAdvancedSearchFieldTypes in edu/harvard/iq/dataverse/DatasetFieldServiceBean.java:
It is doing an order by o.id resulting in the later added new field ending at the bottom. If the function is changed to do order by o.displayOrder,o.id, the problem is resolved.
public List<DatasetFieldType> findAllAdvancedSearchFieldTypes() {
return em.createQuery("select object(o) from DatasetFieldType as o where o.advancedSearchFieldType = true and o.title != '' order by o.displayOrder,o.id", DatasetFieldType.class).getResultList();
}
The text was updated successfully, but these errors were encountered:
When adding a new inputfield to an existing custom metdatablock, via the TSV file upload, the Metadata edit and Dataset create forms do respect the configured 'displayorder'. So when adding a new field and giving it an order '0' and renumber the others, the new field is displayed at the top of the metadatablock.
However, the Advanced Search page, does always show this new field at the bottom of the metadatablock.
The function that is responsible for this is
findAllAdvancedSearchFieldTypes
inedu/harvard/iq/dataverse/DatasetFieldServiceBean.java
:dataverse/src/main/java/edu/harvard/iq/dataverse/DatasetFieldServiceBean.java
Line 95 in d3cba3f
It is doing an
order by o.id
resulting in the later added new field ending at the bottom. If the function is changed to doorder by o.displayOrder,o.id
, the problem is resolved.The text was updated successfully, but these errors were encountered: