From 40439e97d188dc8c37358f6481aab56d904e20da Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Wed, 8 Feb 2023 17:11:40 -0500 Subject: [PATCH] Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml This patch moves the authorized value insertions for ERM categories into the language-specific auth_values.yml file. To test: 1. Count the number of authorized values in the mandatory categories select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); --> There should be 929 2. Delete the authorized values from these categories delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif'); 3. Apply patch 4. Load the mandatory authorized values ./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load 5. Redo step 1 --> There should be the same number (929) 6. Update translations cd misc/translator ./translate update xx-XX 7. Search the po/xx-XX-installer.po file for any of the loaded authorized values For example, grep "Abstract and index" po/xx-XX-installer.po --> descriptions should be translatable Signed-off-by: Katrin Fischer --- .../data/mysql/en/mandatory/auth_values.yml | 151 ++++++++++++++++++ .../data/mysql/mandatory/auth_val_cat.sql | 53 ------ 2 files changed, 151 insertions(+), 53 deletions(-) diff --git a/installer/data/mysql/en/mandatory/auth_values.yml b/installer/data/mysql/en/mandatory/auth_values.yml index 9e6e7f7567..b863071ebf 100644 --- a/installer/data/mysql/en/mandatory/auth_values.yml +++ b/installer/data/mysql/en/mandatory/auth_values.yml @@ -57,6 +57,157 @@ tables: - category: "HSBND_FREQ" authorised_value: "EW" lib: "Every week" + #ERM + - category: "ERM_AGREEMENT_STATUS" + authorised_value: "active" + lib: "Active" + - category: "ERM_AGREEMENT_STATUS" + authorised_value: "in_negotiation" + lib: "In negotiation" + - category: "ERM_AGREEMENT_STATUS" + authorised_value: "closed" + lib: "Closed" + - category: "ERM_AGREEMENT_CLOSURE_REASON" + authorised_value: "expired" + lib: "Expired" + - category: "ERM_AGREEMENT_CLOSURE_REASON" + authorised_value: "cancelled" + lib: "Cancelled" + - category: "ERM_AGREEMENT_RENEWAL_PRIORITY" + authorised_value: "for_review" + lib: "For review" + - category: "ERM_AGREEMENT_RENEWAL_PRIORITY" + authorised_value: "renew" + lib: "Renew" + - category: "ERM_AGREEMENT_RENEWAL_PRIORITY" + authorised_value: "cancel" + lib: "Cancel" + - category: "ERM_USER_ROLES" + authorised_value: "librarian" + lib: "ERM librarian" + - category: "ERM_USER_ROLES" + authorised_value: "subject_specialist" + lib: "Subject specialist" + - category: "ERM_LICENSE_TYPE" + authorised_value: "local" + lib: "Local" + - category: "ERM_LICENSE_TYPE" + authorised_value: "consortial" + lib: "Consortial" + - category: "ERM_LICENSE_TYPE" + authorised_value: "national" + lib: "National" + - category: "ERM_LICENSE_TYPE" + authorised_value: "alliance" + lib: "Alliance" + - category: "ERM_LICENSE_STATUS" + authorised_value: "in_negotiation" + lib: "In negotiation" + - category: "ERM_LICENSE_STATUS" + authorised_value: "not_yet_active" + lib: "Not yet active" + - category: "ERM_LICENSE_STATUS" + authorised_value: "active" + lib: "Active" + - category: "ERM_LICENSE_STATUS" + authorised_value: "rejected" + lib: "Rejected" + - category: "ERM_LICENSE_STATUS" + authorised_value: "expired" + lib: "Expired" + - category: "ERM_AGREEMENT_LICENSE_STATUS" + authorised_value: "controlling" + lib: "Controlling" + - category: "ERM_AGREEMENT_LICENSE_STATUS" + authorised_value: "future" + lib: "Future" + - category: "ERM_AGREEMENT_LICENSE_STATUS" + authorised_value: "history" + lib: "Historic" + - category: "ERM_AGREEMENT_LICENSE_LOCATION" + authorised_value: "filing_cabinet" + lib: "Filing cabinet" + - category: "ERM_AGREEMENT_LICENSE_LOCATION" + authorised_value: "cupboard" + lib: "Cupboard" + - category: "ERM_PACKAGE_TYPE" + authorised_value: "local" + lib: "Local" + - category: "ERM_PACKAGE_TYPE" + authorised_value: "complete" + lib: "Complete" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "AggregatedFullText" + lib: "Aggregated full" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "AbstractAndIndex" + lib: "Abstract and index" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "EBook" + lib: "E-book" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "MixedContent" + lib: "Mixed content" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "EJournal" + lib: "E-journal" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "OnlineReference" + lib: "Online reference" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "Print" + lib: "Print" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "StreamingMedia" + lib: "Streaming media" + - category: "ERM_PACKAGE_CONTENT_TYPE" + authorised_value: "Unknown" + lib: "Unknown" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "journal" + lib: "Journal" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "newsletter" + lib: "Newsletter" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "report" + lib: "Report" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "proceedings" + lib: "Proceedings" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "website" + lib: "Website" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "newspaper" + lib: "Newspaper" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "unspecified" + lib: "Unspecified" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "book" + lib: "Book" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "ebook" + lib: "E-book" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "bookseries" + lib: "Bookseries" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "database" + lib: "Database" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "thesisdissertation" + lib: "Thesis/Dissertation" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "streamingaudio" + lib: "Streaming audio" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "streamingvideo" + lib: "Streaming video" + - category: "ERM_TITLE_PUBLICATION_TYPE" + authorised_value: "audiobook" + lib: "AudioBook" # Country codes - authorised_values: diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql index 4162f94f13..fc11f7ac9a 100644 --- a/installer/data/mysql/mandatory/auth_val_cat.sql +++ b/installer/data/mysql/mandatory/auth_val_cat.sql @@ -87,56 +87,3 @@ VALUES ('ERM_PACKAGE_TYPE', 1), ('ERM_PACKAGE_CONTENT_TYPE', 1), ('ERM_TITLE_PUBLICATION_TYPE', 1); - -INSERT IGNORE INTO authorised_values (category, authorised_value, lib) -VALUES - ('ERM_AGREEMENT_STATUS', 'active', 'Active'), - ('ERM_AGREEMENT_STATUS', 'in_negotiation', 'In negotiation'), - ('ERM_AGREEMENT_STATUS', 'closed', 'Closed'), - ('ERM_AGREEMENT_CLOSURE_REASON', 'expired', 'Expired'), - ('ERM_AGREEMENT_CLOSURE_REASON', 'cancelled', 'Cancelled'), - ('ERM_AGREEMENT_RENEWAL_PRIORITY', 'for_review', 'For review'), - ('ERM_AGREEMENT_RENEWAL_PRIORITY', 'renew', 'Renew'), - ('ERM_AGREEMENT_RENEWAL_PRIORITY', 'cancel', 'Cancel'), - ('ERM_USER_ROLES', 'librarian', 'ERM librarian'), - ('ERM_USER_ROLES', 'subject_specialist', 'Subject specialist'), - ('ERM_LICENSE_TYPE', 'local', 'Local'), - ('ERM_LICENSE_TYPE', 'consortial', 'Consortial'), - ('ERM_LICENSE_TYPE', 'national', 'National'), - ('ERM_LICENSE_TYPE', 'alliance', 'Alliance'), - ('ERM_LICENSE_STATUS', 'in_negotiation', 'In negotiation'), - ('ERM_LICENSE_STATUS', 'not_yet_active', 'Not yet active'), - ('ERM_LICENSE_STATUS', 'active', 'Active'), - ('ERM_LICENSE_STATUS', 'rejected', 'Rejected'), - ('ERM_LICENSE_STATUS', 'expired', 'Expired'), - ('ERM_AGREEMENT_LICENSE_STATUS', 'controlling', 'Controlling'), - ('ERM_AGREEMENT_LICENSE_STATUS', 'future', 'Future'), - ('ERM_AGREEMENT_LICENSE_STATUS', 'history', 'Historic'), - ('ERM_AGREEMENT_LICENSE_LOCATION', 'filing_cabinet', 'Filing cabinet'), - ('ERM_AGREEMENT_LICENSE_LOCATION', 'cupboard', 'Cupboard'), - ('ERM_PACKAGE_TYPE', 'local', 'Local'), - ('ERM_PACKAGE_TYPE', 'complete', 'Complete'), - ('ERM_PACKAGE_CONTENT_TYPE', 'AggregatedFullText', 'Aggregated full'), - ('ERM_PACKAGE_CONTENT_TYPE', 'AbstractAndIndex', 'Abstract and index'), - ('ERM_PACKAGE_CONTENT_TYPE', 'EBook', 'E-book'), - ('ERM_PACKAGE_CONTENT_TYPE', 'MixedContent', 'Mixed content'), - ('ERM_PACKAGE_CONTENT_TYPE', 'EJournal', 'E-journal'), - ('ERM_PACKAGE_CONTENT_TYPE', 'OnlineReference', 'Online reference'), - ('ERM_PACKAGE_CONTENT_TYPE', 'Print', 'Print'), - ('ERM_PACKAGE_CONTENT_TYPE', 'StreamingMedia', 'Streaming media'), - ('ERM_PACKAGE_CONTENT_TYPE', 'Unknown', 'Unknown'), - ('ERM_TITLE_PUBLICATION_TYPE', 'journal', 'Journal'), - ('ERM_TITLE_PUBLICATION_TYPE', 'newsletter', 'Newsletter'), - ('ERM_TITLE_PUBLICATION_TYPE', 'report', 'Report'), - ('ERM_TITLE_PUBLICATION_TYPE', 'proceedings', 'Proceedings'), - ('ERM_TITLE_PUBLICATION_TYPE', 'website', 'Website'), - ('ERM_TITLE_PUBLICATION_TYPE', 'newspaper', 'Newspaper'), - ('ERM_TITLE_PUBLICATION_TYPE', 'unspecified', 'Unspecified'), - ('ERM_TITLE_PUBLICATION_TYPE', 'book', 'Book'), - ('ERM_TITLE_PUBLICATION_TYPE', 'ebook', 'E-book'), - ('ERM_TITLE_PUBLICATION_TYPE', 'bookseries', 'Bookseries'), - ('ERM_TITLE_PUBLICATION_TYPE', 'database', 'Database'), - ('ERM_TITLE_PUBLICATION_TYPE', 'thesisdissertation', 'Thesis/Dissertation'), - ('ERM_TITLE_PUBLICATION_TYPE', 'streamingaudio', 'Streaming audio'), - ('ERM_TITLE_PUBLICATION_TYPE', 'streamingvideo', 'Streaming video'), - ('ERM_TITLE_PUBLICATION_TYPE', 'audiobook', 'AudioBook'); -- 2.30.2