Skip to content

Commit bd43142

Browse files
committed
Merge remote-tracking branch 'IQSS/develop' into DANS-CSL
2 parents 2f3d169 + d70de2c commit bd43142

35 files changed

+619
-137
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Json Printer Bug fix
2+
3+
DatasetFieldTypes in MetadataBlock response that are also a child of another DatasetFieldType were being returned twice. The child DatasetFieldType was included in the "fields" object as well as in the "childFields" of it's parent DatasetFieldType. This fix suppresses the standalone object so only one instance of the DatasetFieldType is returned (in the "childFields" of its parent).
4+
This fix changes the Json output of the API `/api/dataverses/{dataverseAlias}/metadatablocks`
5+
6+
## Backward Incompatible Changes
7+
8+
The Json response of API call `/api/dataverses/{dataverseAlias}/metadatablocks` will no longer include the DatasetFieldTypes in "fields" if they are children of another DatasetFieldType. The child DatasetFieldType will only be included in the "childFields" of it's parent DatasetFieldType.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support for legacy configuration of a PermaLink PID provider, e.g. using the :Protocol,:Authority, and :Shoulder settings, is fixed.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bug Fix:
2+
OAI Client harvesting now uses the correct granularity while re-run a partial harvest (using the `from` parameter). The correct granularity comes from the `Identify` verb request.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug with My Data where listing dataverses for a user with only rights on harvested dataverses would result in a server error response.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Demo/Eval Container Tutorial
2+
3+
The demo/eval container tutorial has been updated to use the Permalink PID provider instead of the FAKE DOI Provider. See also #11107.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This release fixes a bug that caused Dataverse to generate unnecessary solr documents for files when a file is added/deleted from a draft dataset. These documents could accumulate and potentially impact performance.
2+
3+
Assuming the upgrade to solr 9.7.0 also occurs in this release, there's nothing else needed for this PR. (Starting with a new solr insures the solr db is empty and that a reindex is already required.)
4+
5+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Fixes consequences for not adding some optional fields in update dataverse API
2+
3+
Omitting optional fields inputLevels, facetIds, or metadataBlockNames caused data to be deleted.
4+
This fix no longer deletes data for these fields. Two new flags have been added to the ``metadataBlocks`` Json object to signal the deletion of the data.
5+
- ``inheritMetadataBlocksFromParent: true`` will remove ``metadataBlockNames`` and ``inputLevels`` if the Json objects are omitted.
6+
- ``inheritFacetsFromParent: true`` will remove ``facetIds`` if the Json object is omitted.
7+
8+
For more information, see issue [#11130](https://github.com/IQSS/dataverse/issues/11130)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Search fix when using AVOID_EXPENSIVE_SOLR_JOIN=true
2+
3+
Dataverse v6.5 introduced a bug which causes search to fail for non-superusers in multiple groups when the AVOID_EXPENSIVE_SOLR_JOIN feature flag is set to true. This releases fixes the bug.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Release Highlights
2+
3+
### Update a Global Role
4+
5+
A new API endpoint has been added that allows a global role to be updated. See [Native API Guide > Update Global Role](https://guides.dataverse.org/en/6.3/api/native-api.html#update-global-role) (#10612)
6+
7+
## Bug fixes
8+
9+
### Edition of custom role fixed
10+
11+
It is now possible to edit a custom role with the same alias (reported in #8808)

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,23 @@ Note that setting any of these fields overwrites the previous configuration.
128128

129129
When it comes to omitting these fields in the JSON:
130130

131-
- Omitting ``facetIds`` or ``metadataBlockNames`` causes the Dataverse collection to inherit the corresponding configuration from its parent.
132-
- Omitting ``inputLevels`` removes any existing custom input levels in the Dataverse collection.
133-
- Omitting the entire ``metadataBlocks`` object in the request JSON would exclude the three sub-objects, resulting in the application of the two changes described above.
131+
- Omitting ``facetIds`` or ``metadataBlockNames`` causes no change to the Dataverse collection. To delete the current configuration and inherit the corresponding configuration from its parent include the flag ``inheritFacetsFromParent`` and/or ``inheritMetadataBlocksFromParent`` respectively.
132+
- Omitting ``inputLevels`` causes no change to the Dataverse collection. Including the flag ``inheritMetadataBlocksFromParent`` will cause the custom ``inputLevels`` to be deleted and inherited from the parent.
133+
- Omitting the entire ``metadataBlocks`` object in the request JSON would cause no change to the ``inputLevels``, ``facetIds`` or ``metadataBlockNames`` of the Dataverse collection.
134134

135135
To obtain an example of how these objects are included in the JSON file, download :download:`dataverse-complete-optional-params.json <../_static/api/dataverse-complete-optional-params.json>` file and modify it to suit your needs.
136136

137+
To force the configurations to be deleted and inherited from the parent's configuration include the following ``metadataBlocks`` object in your JSON
138+
139+
.. code-block:: json
140+
141+
"metadataBlocks": {
142+
"inheritMetadataBlocksFromParent": true,
143+
"inheritFacetsFromParent": true
144+
}
145+
146+
.. note:: Including both the list ``metadataBlockNames`` and the flag ``"inheritMetadataBlocksFromParent": true`` will result in an error being returned {"status": "ERROR", "message": "Metadata block can not contain both metadataBlockNames and inheritMetadataBlocksFromParent: true"}. The same is true for ``facetIds`` and ``inheritFacetsFromParent``.
147+
137148
See also :ref:`collection-attributes-api`.
138149

139150
.. _view-dataverse:
@@ -4558,12 +4569,12 @@ The JSON representation of a role (``roles.json``) looks like this::
45584569
45594570
{
45604571
"alias": "sys1",
4561-
"name": Restricted System Role,
4562-
"description": A person who may only add datasets.,
4572+
"name": "Restricted System Role",
4573+
"description": "A person who may only add datasets.",
45634574
"permissions": [
45644575
"AddDataset"
45654576
]
4566-
}
4577+
}
45674578
45684579
.. note:: alias is constrained to a length of 16 characters
45694580
@@ -5721,22 +5732,43 @@ Creates a global role in the Dataverse installation. The data POSTed are assumed
57215732
.. code-block:: bash
57225733
57235734
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
5724-
export SERVER_URL=https://demo.dataverse.org
5725-
export ID=root
5735+
export SERVER_URL=http://localhost:8080
57265736
5727-
curl -H "X-Dataverse-key:$API_TOKEN" -X POST "$SERVER_URL/api/admin/roles" --upload-file roles.json
5737+
curl -H "Content-Type: application/json" -H "X-Dataverse-key:$API_TOKEN" -X POST "$SERVER_URL/api/admin/roles" --upload-file roles.json
5738+
5739+
``roles.json`` see :ref:`json-representation-of-a-role`
5740+
5741+
Update Global Role
5742+
~~~~~~~~~~~~~~~~~~
5743+
5744+
Update a global role in the Dataverse installation. The PUTed data is assumed to be a complete JSON role as it will overwrite the existing role. ::
5745+
5746+
PUT http://$SERVER/api/admin/roles/$ID
5747+
5748+
A curl example using an ``ID``
5749+
5750+
.. code-block:: bash
5751+
5752+
export SERVER_URL=http://localhost:8080
5753+
export ID=24
5754+
5755+
curl -H "Content-Type: application/json" -X PUT "$SERVER_URL/api/admin/roles/$ID" --upload-file roles.json
57285756
57295757
``roles.json`` see :ref:`json-representation-of-a-role`
57305758
57315759
Delete Global Role
57325760
~~~~~~~~~~~~~~~~~~
57335761
5762+
Deletes an ``DataverseRole`` whose ``id`` is passed. ::
5763+
5764+
DELETE http://$SERVER/api/admin/roles/$ID
5765+
57345766
A curl example using an ``ID``
57355767
57365768
.. code-block:: bash
57375769
57385770
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
5739-
export SERVER_URL=https://demo.dataverse.org
5771+
export SERVER_URL=http://localhost:8080
57405772
export ID=24
57415773
57425774
curl -H "X-Dataverse-key:$API_TOKEN" -X DELETE "$SERVER_URL/api/admin/roles/$ID"
@@ -6625,6 +6657,8 @@ MyData
66256657
66266658
The MyData API is used to get a list of just the datasets, dataverses or datafiles an authenticated user can edit.
66276659
6660+
The API excludes dataverses linked to an harvesting client. This results in `a known issue <https://github.com/IQSS/dataverse/issues/11083>`_ where regular datasets in harvesting dataverses are missing from the results.
6661+
66286662
A curl example listing objects
66296663
66306664
.. code-block:: bash

0 commit comments

Comments
 (0)