-
Notifications
You must be signed in to change notification settings - Fork 536
QDR/6886 external status labels #7967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kcondon
merged 90 commits into
IQSS:develop
from
QualitativeDataRepository:QDR/6886-external_status_labels
Oct 7, 2021
Merged
Changes from all commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
c9750a0
initial external status label impl
qqmyers 19dcce1
typos, update errors, change regexp
qqmyers c5b215a
typo missing )
qqmyers d0d996c
fix regexp, use new error msgs
qqmyers 044cbbc
allow delete, clear upon publication
qqmyers 149baa3
typo
qqmyers 21efbb8
don't say null in email
qqmyers dac5389
fix: get the datasetversion
qqmyers 346af0d
require publish permission, add label list setting
qqmyers 017254d
add status label in search results
qqmyers cda78c2
make external status searchable/fix display in search
qqmyers 62166f2
add to dataset card
qqmyers 7ceef90
add curation status menu
qqmyers 2c5ae21
handle nulls
qqmyers 6dbc26a
fix update
qqmyers b3a224f
add remove status
qqmyers 1648080
typo getting bundled string
qqmyers b3a20c3
bundle typo, move remove outside repeat
qqmyers 74e3622
update dataset after status change
qqmyers 25dbdc1
debug publish button
qqmyers 839bc34
show menu when enabled
qqmyers 250cb2c
fix carat
qqmyers f7c61d0
handle empty and null status
qqmyers 0c91b18
handle trailing space(s), update messaging
qqmyers 6551af4
add status flyway
qqmyers c37ad7c
bad script name
qqmyers 5d7eaea
change to label-info to adjust color
qqmyers a7a8f80
Merge remote-tracking branch 'IQSS/develop' into
qqmyers 4763762
restrict ext status label visibility to those who can publish
qqmyers 2bf2686
handle string conversion
qqmyers 25cfbac
use entityId directly
qqmyers 46b10e3
Merge remote-tracking branch 'IQSS/develop' into QDR/6886-external_st…
qqmyers 448e212
update flyway
qqmyers 11e45a2
update workingVersion after status change
qqmyers d4b2d8d
missing </div> and spacing
qqmyers b135cdc
don't create list if empty
qqmyers cb876cb
fix menu/button logic
qqmyers 64b8b90
Merge remote-tracking branch 'IQSS/develop' into QDR/6886-external_st…
qqmyers 9368f55
update flyway numbering
qqmyers 58dac87
Merge remote-tracking branch 'IQSS/develop' into
qqmyers c304f09
docs
qqmyers 039d239
fix error on submit for review
qqmyers effe3bf
add a curation status report api call
qqmyers 702df0e
allow config of curation labels per collection
qqmyers b24e775
failed refactor fix
qqmyers db4e136
sql script update
qqmyers c6c5604
more debug info
qqmyers a45b2e7
change loop
qqmyers fa4a671
fix default, update label setting menu and command
qqmyers 20cf1af
debug/ handle null
qqmyers df3fac7
fix no parent logic
qqmyers 117f022
Merge remote-tracking branch 'IQSS/develop' into
qqmyers eade006
add apis and docs
qqmyers 10996d6
cleanup
qqmyers d266bb3
make role reporting generic
qqmyers 56fd065
style fixes
qqmyers 20e31e5
Merge remote-tracking branch 'IQSS/develop' into
qqmyers bc066f7
merge issue
qqmyers 8f8531a
Revert "style fixes"
qqmyers 20cf55d
cleanup
qqmyers b196807
Merge remote-tracking branch 'IQSS/develop' into QDR/6886-external_st…
qqmyers 38b8baa
addressing review feedback
qqmyers 24d4a57
Apply suggestions from code review
qqmyers 1ce9680
add doc to index
qqmyers 0521035
Merge branch 'QDR/6886-external_status_labels' of https://github.com/…
qqmyers b888b41
Update dataverse example to match dataset one
qqmyers 86fee63
removing external
djbrooke 8a8f51e
adding solr schema update notes
djbrooke cc58237
Test fix
qqmyers d83c92a
Apply suggestions from code review
qqmyers 3e86dcf
Merge branch 'QDR/6886-external_status_labels' of https://github.com/…
qqmyers 5e0a43e
doc text/structure updates
qqmyers 5402636
remove word
qqmyers ae61cbe
adding more information about what labels do
djbrooke 3a846ca
Merge branch 'develop' into QDR/6886-external_status_labels #6886
pdurbin a23d506
get guides to build (`make html` was failing) #6886
pdurbin fa4f8cc
updating release note
djbrooke a79ce03
Fix PUT curationSetLabel and test
qqmyers b78da86
Merge branch 'QDR/6886-external_status_labels' of https://github.com/…
qqmyers 589cf64
refactor issue
qqmyers 6d5c2e0
updating release notes with instructions for custom metadata blocks
djbrooke b4e2488
missing 's'
qqmyers 8f670d8
Merge branch 'QDR/6886-external_status_labels' of https://github.com/…
qqmyers fe77072
add api key for getting the current set
qqmyers cca90e5
fix api docs name param
qqmyers c72c57a
merge needed for put/delete
qqmyers cc8e146
don't need to be super to get allowed curation labels in set
qqmyers 0b617f6
add permission check
qqmyers 10e8bc4
fix concatenation
qqmyers 0b68121
fix null for no label
qqmyers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| ### Curation Status Labels | ||
|
|
||
| A new :AllowedCurationLabels setting allows a sysadmins to define one or more sets of labels that can be applied to a draft Dataset version via the user interface or API to indicate the status of the dataset with respect to a defined curation process. | ||
|
|
||
| Labels are completely customizable (alphanumeric or spaces, up to 32 characters, e.g. "Author contacted", "Privacy Review", "Awaiting paper publication"). Superusers can select a specific set of labels, or disable this functionality per collection. Anyone who can publish a draft dataset (e.g. curators) can set/change/remove labels (from the set specified for the collection containing the dataset) via the user interface or via an API. The API also would allow external tools to search for, read and set labels on Datasets, providing an integration mechanism. Labels are visible on the Dataset page and in Dataverse collection listings/search results. Internally, the labels have no effect, and at publication, any existing label will be removed. A reporting API call allows admins to get a list of datasets and their curation statuses. | ||
|
|
||
| The Solr schema must be updated as part of installing the release of Dataverse containing this feature for it to work. | ||
|
|
||
| ## Additional Release Steps | ||
|
|
||
| 1\. Replace Solr schema.xml to allow Curation Labels to be used. See specific instructions below for those installations with custom metadata blocks (1a) and those without (1b). | ||
|
|
||
| 1a\. | ||
|
|
||
| For installations with Custom Metadata Blocks: | ||
|
|
||
| -stop solr instance (usually service solr stop, depending on solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/5.7/installation/prerequisites.html#solr-init-script) | ||
|
|
||
| - add the following line to your schema.xml: | ||
|
|
||
| <field name="externalStatus" type="string" stored="true" indexed="true" multiValued="false"/> | ||
|
|
||
| - restart solr instance (usually service solr start, depending on solr/OS) | ||
|
|
||
| 1b\. | ||
|
|
||
| For installations without Custom Metadata Blocks: | ||
|
|
||
| -stop solr instance (usually service solr stop, depending on solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/5.7/installation/prerequisites.html#solr-init-script) | ||
|
|
||
| -replace schema.xml | ||
|
|
||
| cp /tmp/dvinstall/schema.xml /usr/local/solr/solr-8.8.1/server/solr/collection1/conf | ||
|
|
||
| -start solr instance (usually service solr start, depending on solr/OS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| Dataset Curation Label API | ||
| ========================== | ||
|
|
||
| When the :ref:`:AllowedCurationLabels <:AllowedCurationLabels>` setting has been used to define Curation Labels, this API can be used to set these labels on draft datasets. | ||
| Superusers can define which set of labels are allowed for a given datasets in a collection/an individual dataset using the api described in the :doc:`/admin/dataverses-datasets` section. | ||
| The API here can be used by curators/those who have permission to publish the dataset to get/set/change/delete the label currently assigned to a draft dataset. | ||
|
|
||
| This functionality is intended as a mechanism to integrate the Dataverse software with an external curation process/application: it is a way to make the state of a draft dataset, | ||
| as defined in the external process, visible within Dataverse. These labels have no other effect in Dataverse and are only visible to curators/those with permission to publish the dataset. | ||
| Any curation label assigned to a draft dataset will be removed upon publication. | ||
|
|
||
| Get a Draft Dataset's Curation Label | ||
| ------------------------------------ | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
| export DATASET_ID='12345' | ||
| export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
| export SERVER_URL=https://demo.dataverse.org | ||
|
|
||
| Example 1: Get the label using the DATASET ID | ||
|
|
||
| curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/$DATASET_ID/curationStatus" | ||
|
|
||
| Example 2: Get the label using the DATASET PID | ||
|
|
||
| curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/curationStatus?persistentId=$DATASET_PID" | ||
|
|
||
| You should expect a 200 ("OK") response and the draft dataset's curation status label contained in a JSON 'data' object. | ||
|
|
||
|
|
||
| Set a Draft Dataset's Curation Label | ||
| ------------------------------------ | ||
|
|
||
| To add a curation label for a draft Dataset, specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID) and the label desired. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
| export DATASET_ID='12345' | ||
| export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
| export LABEL='Author contacted' | ||
| export SERVER_URL=https://demo.dataverse.org | ||
|
|
||
| Example: Add the label using the DATASET ID | ||
|
|
||
| curl -X PUT -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/$DATASET_ID/curationStatus?label=$LABEL" | ||
|
|
||
| Example 2: Add a description using the DATASET PID | ||
|
|
||
| curl -X PUT -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/curationStatus?label=$LABEL&persistentId=$DATASET_PID" | ||
|
|
||
| You should expect a 200 ("OK") response indicating that the label has been set. 403/Forbidden and 400/Bad Request responses are also possible, i.e. if you don't have permission to make this change or are trying to add a label that isn't in the allowed set or to add a label to a dataset with no draft version. | ||
|
|
||
|
|
||
| Delete a Draft Dataset's Curation Label | ||
| --------------------------------------- | ||
|
|
||
| To delete the curation label on a draft Dataset, specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID). | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
| export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
| export SERVER_URL=https://demo.dataverse.org | ||
|
|
||
| Example: Delete the label using the DATASET PID | ||
|
|
||
| curl -X DELETE -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/curationStatus?persistentId=$DATASET_PID" | ||
|
|
||
| You should expect a 200 ("OK") response indicating the label has been removed. | ||
|
|
||
|
|
||
| Get the Set of Allowed Labels for a Dataset | ||
| ------------------------------------------- | ||
|
|
||
| To get the list of allowed curation labels allowed for a given Dataset | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
| export DATASET_ID='12345' | ||
| export DATASET_PID='doi:10.5072/FK2A1B2C3' | ||
| export SERVER_URL=https://demo.dataverse.org | ||
|
|
||
| Example 1: Get the label using the DATASET ID | ||
|
|
||
| curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/$DATASET_ID/allowedCurationLabels" | ||
|
|
||
| Example 2: Get the label using the DATASET PID | ||
|
|
||
| curl -H X-Dataverse-key:$API_TOKEN "$SERVER_URL/api/datasets/:persistentId/allowedCurationLabels?persistentId=$DATASET_PID" | ||
|
|
||
| You should expect a 200 ("OK") response with a comma-separated list of allowed labels contained in a JSON 'data' object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,5 +20,6 @@ API Guide | |
| sword | ||
| client-libraries | ||
| external-tools | ||
| curation-labels | ||
| apps | ||
| faq | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,4 @@ Developer Guide | |
| dataset-migration-api | ||
| workflows | ||
| fontcustom | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.