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

Ensure theses are not publishable without an accession number #1222

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

jazairi
Copy link
Contributor

@jazairi jazairi commented Sep 15, 2023

Why these changes are being introduced:

Because we want the accession number to be used in the preservation workflow, we do not want a thesis without an accession number to be published.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/ETD-596

How this addresses that need:

This adds an accession_number convenience method to the Thesis model that can look up an accession based on a thesis' degree period. This method is included in the publication checks.

The thesis processing form now shows whether it can find an accession number. If no accession number exists, the form will render a hint that prompts the user to create an accession number for the given degree period.

Side effects of this change:

  • A future state of this application is for the Thesis model to belong to the Degree Period model. For now, there is no direct assocation, so we are using ActiveRecord lookups based on the thesis' graduation year and graduation month.
  • Some fixtures have been added to allow tests related to publication status to pass. (Certain thesis fixtures had no degree periods or accession numbers, they could not be put into publication review.)
  • The new action on the Archivematica Accessions dashboard has been overwritten to prefill the degree period ID from params.

Developer

  • All new ENV is documented in README
  • All new ENV has been added to Heroku Pipeline, Staging and Prod
  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

NO

Includes new or updated dependencies?

NO

@mitlib mitlib temporarily deployed to thesis-submit-pr-1222 September 15, 2023 18:41 Inactive
@jazairi jazairi force-pushed the etd-596-accession-publication-check branch from b01905a to 4490a65 Compare September 15, 2023 18:43
@jazairi jazairi temporarily deployed to thesis-submit-pr-1222 September 15, 2023 18:43 Inactive
@coveralls
Copy link

coveralls commented Sep 15, 2023

Coverage Status

coverage: 98.352% (+0.008%) from 98.344% when pulling c4a879a on etd-596-accession-publication-check into 6698161 on main.

@JPrevost JPrevost self-assigned this Sep 20, 2023
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@jazairi jazairi force-pushed the etd-596-accession-publication-check branch from fa8f877 to 1a63f24 Compare September 21, 2023 18:52
…sion number

Why these changes are being introduced:

Because we want the accession number to be used in the preservation
workflow, we do not want a thesis without an accession number to
be published.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/ETD-596

How this addresses that need:

This adds an `accession_number` convenience method to the Thesis model
that can look up an accession based on a thesis' degree period. This
method is included in the publication checks.

The thesis processing form now shows whether it can find an accession
number. If no accession number exists, the form will render a hint that
prompts the user to create an accession number for the given degree
period.

Side effects of this change:

* A future state of this application is for the Thesis model to belong
to the Degree Period model. For now, there is no direct assocation,
so we are using ActiveRecord lookups based on the thesis' graduation
year and graduation month.
* Some fixtures have been added to allow tests related to publication
status to pass. (Certain thesis fixtures had no degree periods or
accession numbers, they could not be put into publication review.)
* The `new` action on the Archivematica Accessions dashboard has been
overwritten to prefill the degree period ID from params.
@jazairi jazairi force-pushed the etd-596-accession-publication-check branch from 1a63f24 to c4a879a Compare September 22, 2023 20:03
@jazairi jazairi merged commit 17164b7 into main Sep 25, 2023
3 checks passed
@jazairi jazairi deleted the etd-596-accession-publication-check branch September 25, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants