Skip to content
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

Insert deposit date into description when each version is published #2368

Closed
arcadiafalcone opened this issue Jul 27, 2022 · 0 comments · Fixed by #2417
Closed

Insert deposit date into description when each version is published #2368

arcadiafalcone opened this issue Jul 27, 2022 · 0 comments · Fixed by #2417
Assignees
Labels

Comments

@arcadiafalcone
Copy link
Collaborator

arcadiafalcone commented Jul 27, 2022

The problem: When a user does not enter a date in H2, no date is displayed in the metadata or indexed for the object.

The date of initial deposit should be entered into the descriptive metadata, both to record this information and to provide a fallback for discovery if the user does not enter a date. This date should not change when the object is versioned unless the user enters a publication date later.

The date of initial deposit should also be retained as the record creation date, and should not change if the object is versioned in future.

Example if deposit date is January 29, 2022 and the object was updated on January 31 and February 15; the user entered a publication date of November 30, 2021:

{
    "event": [
        {
            "type": "deposit",
            "date": [
                {
                    "type": "publication",
                    "value": "2022-01-29",
                    "encoding": {"code": "edtf"}
                }
            ]
        },
        {
            "type": "deposit",
            "date": [
                {
                    "type": "modification",
                    "value": "2022-01-31",
                    "encoding": {"code": "edtf"}
                }
            ]
        },
        {
            "type": "deposit",
            "date": [
                {
                    "type": "modification",
                    "value": "2022-02-15",
                    "encoding": {"code": "edtf"}
                }
            ]
        },
        {
            "type": "publication",
            "date": [
                {
                    "type": "publication",
                    "value": "2021-11-30",
                    "status": "primary",
                    "encoding": {"code": "edtf"}
                }
            ]
        }
    ],
    "adminMetadata": {
        "event": [
            {
                "type": "creation",
                "date": [
                    {
                        "value": "2022-01-29",
                        "encoding": {"code": "edtf"}
                    }
                ]
            }
        ]
    }
}

Dependent on sul-dlss/cocina-models#502 for mapping spec.

Implementation details:

  • Create a new timestamp on each version that is set during the begin_deposit event
  • List all of version timestamps as event type deposit, date type modification in Cocina (see mapping)
  • List the first version's timestamp as event type deposit, date type publication (see mapping)
  • Also add initial deposit date as record creation date in DescriptiveAdminMetadata
@arcadiafalcone arcadiafalcone changed the title Insert deposit date into description when no date is entered by user DRAFT Insert deposit date into description when no date is entered by user Jul 27, 2022
@amyehodge amyehodge added PO Issues being tracked by the product owner 2022 labels Jul 27, 2022
@arcadiafalcone arcadiafalcone changed the title DRAFT Insert deposit date into description when no date is entered by user DRAFT Insert deposit date into description when each version is published Aug 1, 2022
@arcadiafalcone arcadiafalcone changed the title DRAFT Insert deposit date into description when each version is published Insert deposit date into description when each version is published Aug 1, 2022
@justinlittman justinlittman self-assigned this Aug 16, 2022
justinlittman added a commit that referenced this issue Aug 16, 2022
justinlittman added a commit that referenced this issue Aug 16, 2022
justinlittman added a commit that referenced this issue Aug 16, 2022
justinlittman added a commit that referenced this issue Aug 17, 2022
justinlittman added a commit that referenced this issue Aug 17, 2022
justinlittman added a commit that referenced this issue Aug 17, 2022
justinlittman added a commit that referenced this issue Aug 18, 2022
@amyehodge amyehodge removed the PO Issues being tracked by the product owner label Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants