TexasDigitalLibrary / Vireo

Vireo is a turnkey Electronic Thesis and Dissertation (ETD) Management System.
https://texasdigitallibrary.atlassian.net/wiki/spaces/VUG/pages/87490642/About
GNU General Public License v2.0
46 stars 35 forks source link

Issue 1815: Add "Archived" Submission status. #1816

Closed kaladay closed 1 year ago

kaladay commented 1 year ago

resolves #1815

Without this several action logs may fail to migrate when migrating from Vireo 3 into Vireo 4.

The SQL to manually add this to the DB is:

insert into submission_status (id, is_active, is_archived, is_deletable, is_editable_by_reviewer, is_editable_by_student, is_publishable, name, submission_state) values (13, false, true, true, false, false, false, 'Archived', 13);
kaladay commented 1 year ago

Should not be needed. Analysis of the data has revealed that most of the data is in the PUBLISHED status immediately before being switch into the ARCHIVED status or has a Deposit ID set on the Submission.

The migration can be changed to migrate ARCHIVED into PUBLISHED without needing to perform any code changes.

Relevant SQL

Get count of Submissions with a Deposit ID:

select count(*) from submission where id in (select distinct submission_id from actionlog where submissionstate = 'Archived') and depositid is not null;

Get count of Submissions without a Deposit ID:

select count(*) from submission where id in (select distinct submission_id from actionlog where submissionstate = 'Archived') and depositid is null;

Get all of the Action Logs that have a Submission without a Deposit ID and has an ARCHIVED status:

select id, actiondate, submission_id, submissionstate from actionlog where submission_id in (select id from submission where id in (select distinct submission_id from actionlog where submissionstate = 'Archived') and depositid is null) group by submission_id, id order by submission_id asc, actiondate desc;