Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The API endpoints `api/{dataverse-alias}/metadatablocks` and `/api/metadatablocks/{block_id}` have been extended to include the following field:

- `isAdvancedSearchFieldType`: Whether the field can be used in advanced search or not.
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ public static JsonObjectBuilder json(DatasetFieldType fld, Dataverse ownerDatave
fieldsBld.add("description", fld.getDescription());
fieldsBld.add("multiple", fld.isAllowMultiples());
fieldsBld.add("isControlledVocabulary", fld.isControlledVocabulary());
fieldsBld.add("isAdvancedSearchFieldType", fld.isAdvancedSearchFieldType());
fieldsBld.add("displayFormat", fld.getDisplayFormat());
fieldsBld.add("displayOrder", fld.getDisplayOrder());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ void testGetMetadataBlock() {
.body("data.fields.subject.controlledVocabularyValues[0]", CoreMatchers.is("Agricultural Sciences"))
.body("data.fields.title.displayOrder", CoreMatchers.is(0))
.body("data.fields.title.typeClass", CoreMatchers.is("primitive"))
.body("data.fields.title.isRequired", CoreMatchers.is(true));
.body("data.fields.title.isRequired", CoreMatchers.is(true))
.body("data.fields.title.isAdvancedSearchFieldType", CoreMatchers.is(true));
}

@Test
Expand Down