CDLUC3 / ezid-service

4 stars 0 forks source link

Add support for affiliation identifiers in DOI registration form #226

Closed mariagould closed 2 years ago

mariagould commented 2 years ago

The DataCite schema supports identifiers for affiliations but the EZID DOI registration form does not yet support this. We need to update the existing form to allow users to provide an affiliation identifier when they register a DOI.

To support input of affiliation identifiers, we need to have the following four fields in the UI registration form (we currently only have one of these, as indicated with the asterisk*).

(1) Field name in registration form: Affiliation* Label in XML: affiliation Definition: The creator or contributor's institutional or organizational affiliation Expected format: Free text Example input: California Digital Library

(2) Field name in registration form: Affiliation Identifier Label in XML: affiliationIdentifier Definition: The unique identifier for the organizational or institutional affiliation Expected format: Depends on identifier scheme Example input: https://ror.org/03yrm5c26

(3) Field name in registration form: Identifier Scheme Label in XML: affiliationIdentifierScheme Definition: Name of affiliation identifier scheme Expected format: Free text Example input: ROR Note: Mandatory if Affiliation Identifier is present

(4) Field name in registration form: Scheme URI Label in XML: SchemeURI Definition: URI of the affiliation identifier scheme Expected format: URI Example input: https://ror.org/

To do:

  1. Update the fields in the registration form (they need to be updated in 2 sections: "Creator" and "Contributor" - the same set of fields in each section) (screenshots attached)
  2. Make sure field inputs will be included in XML sent to DataCite Screen Shot 2021-10-12 at 9.17.38 PM.png[Uploading... Screen Shot 2021-10-12 at 9.17.46 PM.png]
rushirajnenuji commented 2 years ago

Name Identifier logic:

def _validateNameIdGrouping(suffix, ni, ni_s, ni_s_uri):
    err = {}
    if ni and not ni_s:
        err['nameIdentifier_{0}-nameIdentifierScheme'.format(suffix)] = _(
            "An Identifier Scheme must be filled in if you specify an Identifier."
        )
    if ni_s and not ni:
        err['nameIdentifier_{0}-nameIdentifier'.format(suffix)] = _(
            "An Identifier must be filled in if you specify an Identifier Scheme."
        )
    if ni_s_uri:
        if not ni:
            err['nameIdentifier_{0}-nameIdentifier'.format(suffix)] = _(
                "An Identifier must be filled in if you specify a Scheme URI."
            )
        if not ni_s:
            err['nameIdentifier_{0}-nameIdentifierScheme'.format(suffix)] = _(
                "An Identifier Scheme must be filled in."
            )
    return err
rushirajnenuji commented 2 years ago

this ticket is now complete, deployed as part of v2.0.6 release