From 04c6c950bf427d16c7b398ffec26b44a45a2dbc9 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Mon, 20 Jun 2022 10:18:08 +0100
Subject: [PATCH] Bug 28854: Add default AV and Syspref values

This patch adds the new AV and System Preferences to the installer.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
---
 installer/data/mysql/en/optional/auth_val.yml | 8 ++++++++
 installer/data/mysql/mandatory/sysprefs.sql   | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/installer/data/mysql/en/optional/auth_val.yml b/installer/data/mysql/en/optional/auth_val.yml
index b680987a00..41c1cec9e6 100644
--- a/installer/data/mysql/en/optional/auth_val.yml
+++ b/installer/data/mysql/en/optional/auth_val.yml
@@ -106,6 +106,10 @@ tables:
           authorised_value: "4"
           lib : "Missing"
 
+        - category: "LOST"
+          authorised_value: "5"
+          lib : "Missing from bundle"
+
         # damaged status of an item
         - category: "DAMAGED"
           authorised_value: "1"
@@ -183,6 +187,10 @@ tables:
           authorised_value: "2"
           lib: "Staff Collection"
 
+        - category: "NOT_LOAN"
+          authorised_value: "3"
+          lib: "Added to bundle"
+
         # restricted status of an item,linked to items.restricted
         - category: "RESTRICTED"
           authorised_value: "1"
diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql
index 108007b3df..04d36ff9e1 100644
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ b/installer/data/mysql/mandatory/sysprefs.sql
@@ -115,6 +115,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('BorrowerUnwantedField','',NULL,'Name the fields you don\'t need to store for a patron\'s account','free'),
 ('BranchTransferLimitsType','ccode','itemtype|ccode','When using branch transfer limits, choose whether to limit by itemtype or collection code.','Choice'),
 ('BrowseResultSelection','0',NULL,'Enable/Disable browsing search results fromt the bibliographic record detail page in staff interface','YesNo'),
+('BundleLostValue','5',NULL,'Sets the LOST AV value that represents "Missing from bundle" as a lost value','Free'),
+('BundleNotLoanValue','3',NULL,'Sets the NOT_LOAN AV value that represents "Added to bundle" as a not for loan value','Free'),
 ('CalculateFinesOnReturn','1','','Switch to control if overdue fines are calculated on return or not','YesNo'),
 ('CalculateFinesOnBackdate','1','','Switch to control if overdue fines are calculated on return when backdating','YesNo'),
 ('CalendarFirstDayOfWeek','0','0|1|2|3|4|5|6','Select the first day of week to use in the calendar.','Choice'),
-- 
2.20.1