This is a blocker to Bug 24101. As of now we have two checkout types, a normal checkout and an on-site checkout type. In order to target circulation rules to a specific checkout type, the issues table must have information on which type of checkout it is. On-site checkout is currently determined by a boolean value in issues.onsite_checkout database column. For supporting multiple checkout types, we should convert this column into a generic checkout_type field. This Bug also sets an easy-to-extend base for further checkout types. In theory a library could define any types of checkouts dynamically, but support for that is outside the scope of this Bug.
Created attachment 102259 [details] [review] Bug 25037: Add authorised value for checkout types This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "ONSITE" for indicating an on-site checkout. To test: 1. perl installer/data/mysql/updatedatabase.pl
Created attachment 102260 [details] [review] Bug 25037: Add authorised values to sample data
Created attachment 102261 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type To test: 1. perl installer/data/mysql/updatedatabase.pl
Created attachment 102262 [details] [review] Bug 25037: Schema changes
Created attachment 102263 [details] [review] Bug 25037: Replace onsite_checkout with checkout_type To test: 1. Run all these tests: prove t/db_dependent/Circulation.t prove t/db_dependent/Circulation/TooMany.t prove t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t prove t/db_dependent/Items.t prove t/db_dependent/Koha/Account/Line.t 2. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 2. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 1 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 2, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 2 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl
Created attachment 102264 [details] [review] Bug 25037: Replace onsite_checkout with checkout_type To test: 1. Run all these tests: prove t/db_dependent/Circulation.t prove t/db_dependent/Circulation/TooMany.t prove t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t prove t/db_dependent/Items.t prove t/db_dependent/Koha/Account/Line.t 2. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 3. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 2 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 4. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 3, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 2 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 5. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 4 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl
Created attachment 102265 [details] [review] Bug 25037: Add authorised value for checkout types This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "ONSITE" for indicating an on-site checkout. To test: 1. perl installer/data/mysql/updatedatabase.pl
Created attachment 102266 [details] [review] Bug 25037: Add authorised values to sample data
Created attachment 102267 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type To test: 1. perl installer/data/mysql/updatedatabase.pl
Created attachment 102268 [details] [review] Bug 25037: Schema changes
Created attachment 102269 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Run all these tests: prove t/db_dependent/Circulation.t prove t/db_dependent/Circulation/TooMany.t prove t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t prove t/db_dependent/Items.t prove t/db_dependent/Koha/Account/Line.t 2. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 3. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 2 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 4. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 3, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 2 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 5. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 4 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl
Created attachment 102272 [details] [review] Bug 25037: Validate checkout_type in Koha::Checkout->store This patch adds a validation for checkout_type value when storing a Koha::Checkout To test: 1. prove t/db_dependent/Koha/Checkouts.t
Created attachment 102413 [details] [review] Bug 25037: Add authorised value for checkout types This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "ONSITE" for indicating an on-site checkout. To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102414 [details] [review] Bug 25037: Add authorised values to sample data Sponsored-by: The National Library of Finland
Created attachment 102415 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102416 [details] [review] Bug 25037: Schema changes Sponsored-by: The National Library of Finland
Created attachment 102417 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Run all these tests: prove t/db_dependent/Circulation.t prove t/db_dependent/Circulation/TooMany.t prove t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t prove t/db_dependent/Items.t prove t/db_dependent/Koha/Account/Line.t 2. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 3. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 2 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 4. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 3, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 2 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 5. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 4 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Created attachment 102418 [details] [review] Bug 25037: Validate checkout_type in Koha::Checkout->store This patch adds a validation for checkout_type value when storing a Koha::Checkout To test: 1. prove t/db_dependent/Koha/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102419 [details] [review] Bug 25037: Add authorised value for checkout types This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "OS" (on-site) and "C" (normal checkout). To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102420 [details] [review] Bug 25037: Add authorised values to sample data Sponsored-by: The National Library of Finland
Created attachment 102421 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "OS" Else checkout_type becomes "C" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102422 [details] [review] Bug 25037: Schema changes Sponsored-by: The National Library of Finland
Created attachment 102423 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Run all these tests: prove t/db_dependent/Circulation.t prove t/db_dependent/Circulation/TooMany.t prove t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t prove t/db_dependent/Items.t prove t/db_dependent/Koha/Account/Line.t 2. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 3. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 2 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 4. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 3, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 2 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 5. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 4 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Created attachment 102424 [details] [review] Bug 25037: Validate checkout_type in Koha::Checkout->store This patch adds a validation for checkout_type value when storing a Koha::Checkout To test: 1. prove t/db_dependent/Koha/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102586 [details] [review] Bug 25037: Add authorised value for checkout types This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "OS" (on-site) and "C" (normal checkout). To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102587 [details] [review] Bug 25037: Add authorised values to sample data Sponsored-by: The National Library of Finland
Created attachment 102588 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "OS" Else checkout_type becomes "C" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102589 [details] [review] Bug 25037: Schema changes Sponsred-by: The National Library of Finland
Created attachment 102590 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102591 [details] [review] Bug 25037: Validate checkout_type in Koha::Checkout->store This patch adds a validation for checkout_type value when storing a Koha::Checkout To test: 1. prove t/db_dependent/Koha/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102592 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Created attachment 102593 [details] [review] Bug 25037: Add authorised value for checkout types This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "OS" (on-site) and "C" (normal checkout). To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102594 [details] [review] Bug 25037: Add authorised values to sample data Sponsored-by: The National Library of Finland
Created attachment 102595 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "OS" Else checkout_type becomes "C" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102596 [details] [review] Bug 25037: Schema changes Sponsred-by: The National Library of Finland
Created attachment 102597 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102598 [details] [review] Bug 25037: Validate checkout_type in Koha::Checkout->store This patch adds a validation for checkout_type value when storing a Koha::Checkout To test: 1. prove t/db_dependent/Koha/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102599 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Hi Lari, I really like the idea of circulation types - I think I actually suggested something like that when on-site was introduced at the time, because I know other systems use this concept. I have 2 comments for discussion/consideration. 1) "This commit adds an authorised value category "CHECKOUT_TYPE" and an authorised value "OS" (on-site) and "C" (normal checkout)." I feel this is not necessary and would vote for hard-coding the circulation types and their descriptions. It will make it translatable and keep people from 'messing' with it. Unless you plan to really allow people to add a lot more of those? I'd also use more speakign abbreviations, maybe 'ONSITE' and CHECKOUT - no need to make things more cryptical than necessary. It would help doing reports etc. too. 2) On the mailing list it was suggested to have 'normal' 'on-site' and 'all'. I am not sure about the 'all'. I feel it might be complicating things more than necessary. If all was to preserve current behaviour, I don't think that would work as on-site currently is 1 day by default, independent of the normal loan period.
(In reply to Katrin Fischer from comment #39) > Hi Lari, > > I really like the idea of circulation types - I think I actually suggested > something like that when on-site was introduced at the time, because I know > other systems use this concept. Just curious, which systems and how does it work in them? > I have 2 comments for discussion/consideration. > > 1) "This commit adds an authorised value category "CHECKOUT_TYPE" and > an authorised value "OS" (on-site) and "C" (normal checkout)." > > I feel this is not necessary and would vote for hard-coding the circulation > types and their descriptions. It will make it translatable and keep people > from 'messing' with it. Unless you plan to really allow people to add a lot > more of those? The default values are both hardcoded and exist as authorised value. While we are at it, my idea was to add database support for dynamicity. Although, fully supporting such feature would require more changes in the GUI and circulation logic which I do not plan to implement. What comes to messing with the values - we can set a RESTRICT flag into the foreign key which means one cannot change nor delete the authorised values, unless the whole issues and old_issues table is empty. This way a librarian cannot accidentally mess up a production system (unless they really did not had any checkouts (active or returned) yet). But we can proceed with only hardcoding the values. We can move the authorised value patches to another Bug for someone else to continue from there. In order to protect issues.checkout_type from non-existing types, we could use an ENUM data type that only allows a value from a set of possible hardcoded values. I will do that now so we can get this Bug moving easier. We can then later choose whether to include auth value functionality or not. > I'd also use more speakign abbreviations, maybe 'ONSITE' and > CHECKOUT - no need to make things more cryptical than necessary. It would > help doing reports etc. too. I don't have any preference on the code choices. We can make it more readable. > 2) On the mailing list it was suggested to have 'normal' 'on-site' and > 'all'. I am not sure about the 'all'. I feel it might be complicating things > more than necessary. If all was to preserve current behaviour, I don't think > that would work as on-site currently is 1 day by default, independent of the > normal loan period. The circulation rules part of this Bug was moved to Bug 25089. "All" is useful if you only need to separate one or two rules between the types of checkouts. As an example, you could then have one full set of rules with "All" scope, and loan period = 1, renewals allowed = 0 with "on-site" scope. Thx for your input!
Created attachment 102655 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "ONSITE" Else checkout_type becomes "CHECKOUT" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102656 [details] [review] Bug 25037: Schema changes Sponsored-by: The National Library of Finland
Created attachment 102657 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102658 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Created attachment 102659 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "ONSITE" Else checkout_type becomes "CHECKOUT" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102660 [details] [review] Bug 25037: Schema changes Sponsored-by: The National Library of Finland
Created attachment 102661 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102662 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Created attachment 102663 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "ONSITE" Else checkout_type becomes "CHECKOUT" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland
Created attachment 102664 [details] [review] Bug 25037: Schema changes Sponsored-by: The National Library of Finland
Created attachment 102665 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102666 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Created attachment 102675 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 102676 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Hi, two fail sfrom qa-tools FAIL Koha/Checkouts.pm OK critic OK forbidden patterns OK git manipulation FAIL pod *** ERROR: =cut found outside a pod block. Skipping to next block. in file Koha/Checkouts.pm OK pod coverage OK spelling OK valid FAIL Koha/Template/Plugin/Checkouts.pm OK critic FAIL forbidden patterns forbidden pattern: Warning: The 'sub type' may be wrong is declared in a Koha::* package (see bug 15446) (line 57) OK git manipulation OK pod OK pod coverage OK spelling OK valid First is not a problem, the second one needs revision
(In reply to Bernardo Gonzalez Kriegel from comment #55) > FAIL Koha/Template/Plugin/Checkouts.pm > OK critic > FAIL forbidden patterns > forbidden pattern: Warning: The 'sub type' may be wrong is > declared in a Koha::* package (see bug 15446) (line 57) > OK git manipulation > OK pod > OK pod coverage > OK spelling > OK valid > > ..., the second one needs revision It is not really a problem because it is not a Koha::Object, but let's change just for the sake of explicity.
Created attachment 104267 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland
Created attachment 104268 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland
Comment on attachment 104268 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout Review of attachment 104268 [details] [review]: ----------------------------------------------------------------- I checked all the other patches and they were looking good! ::: api/v1/swagger/definitions/checkout.json @@ +53,5 @@ > "description": "Date the item was issued" > }, > + "checkout_type": { > + "type": ["string", "null"], > + "description": "Checkout type, an authorised value under CHECKOUT_TYPE category" The description is still from the v1 version where authorized values were used. Could you here a) add enum for values "CHECKOUT" and "ONSITE" and b) update the description.
Created attachment 105638 [details] [review] Bug 25037: (follow-up) Fix checkout_type property description Also adds a test of the property to checkouts.t REST test. To test: 1. prove t/db_dependent/api/v1/checkouts.t
(In reply to Joonas Kylmälä from comment #59) > Comment on attachment 104268 [details] [review] [review] > Bug 25037: Replace occurences to issues.onsite_checkout > > Review of attachment 104268 [details] [review] [review]: > ----------------------------------------------------------------- > > I checked all the other patches and they were looking good! > > ::: api/v1/swagger/definitions/checkout.json > @@ +53,5 @@ > > "description": "Date the item was issued" > > }, > > + "checkout_type": { > > + "type": ["string", "null"], > > + "description": "Checkout type, an authorised value under CHECKOUT_TYPE category" > > The description is still from the v1 version where authorized values were > used. Could you here a) add enum for values "CHECKOUT" and "ONSITE" and b) > update the description. Done! Thanks for noticing.
Created attachment 105780 [details] [review] Bug 25037: Convert issues.onsite_checkout to issues.checkout_type If onsite_checkout=1, checkout_type becomes "ONSITE" Else checkout_type becomes "CHECKOUT" To test: 1. perl installer/data/mysql/updatedatabase.pl Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 105781 [details] [review] Bug 25037: Schema changes Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 105782 [details] [review] Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Also make it available for templates. To test: 1. prove t/db_dependent/Koha/Checkouts.t 2. prove t/db_dependent/Template/Plugin/Checkouts.t Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 105783 [details] [review] Bug 25037: Replace occurences to issues.onsite_checkout This patch replaces all occurences to issues.onsite_checkout so that on-site checkouts work normally. It does not replace any on-site checkout logic. To test: 1. Investigate Koha source files via command line. We must make sure there are no longer references to issues.onsite_checkout column. You can do this by searching all occurrences of onsite_checkout. grep -rn 'onsite_checkout' | grep -v '\.git' 2. Run all these commands in your command line interface: grep -rl --color=never 'onsite_checkout' | grep '^.*\.t$' | xargs prove prove t/db_dependent/Koha/Account/Line.t prove t/db_dependent/api/v1/checkouts.t 3. Verify koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - Create a record and add two items to it - Checkout both of them, one as on-site checkout and one as normal - Go to INTRANET /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use by ..." => your normal checked out item should say "Checked out to ..." 4. Verify koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc - Repeat step 3 but this time go to OPAC /cgi-bin/koha/opac-detail.pl?biblionumber=XXX where XXX is your record's biblionumber - Observe Holdings table column Status => your on-site checked out item should say "Currently in local use" => your normal checked out item should say "Checked out" 5. Verify koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt - After step 4, go to INTRANET /cgi-bin/koha/members/readingrec.pl?borrowernumber=51 - You will see circulation history table. - Observe your two checkouts from step 3 - Click "Checkouts" tab - Observe your normal checkout in the list - Click "On-site checkouts"" tab - Observe your on-site checkout in the list 6. Verify koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt - Repeat step 5 but this time go to OPAC /cgi-bin/koha/opac-readingrecord.pl Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 105784 [details] [review] Bug 25037: (follow-up) Fix checkout_type property description Also adds a test of the property to checkouts.t REST test. To test: 1. prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
This patch set on longer applies. Please rebase! Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 25037: Convert issues.onsite_checkout to issues.checkout_type Applying: Bug 25037: Schema changes Applying: Bug 25037: Add Koha::Checkouts checkout_type constants and TT plugin Applying: Bug 25037: Replace occurences to issues.onsite_checkout Using index info to reconstruct a base tree... M C4/Circulation.pm M C4/Items.pm M koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt M koha-tmpl/intranet-tmpl/prog/js/checkouts.js M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt M t/db_dependent/Circulation.t M t/db_dependent/Items.t M t/db_dependent/Koha/Account/Line.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Koha/Account/Line.t Auto-merging t/db_dependent/Items.t Auto-merging t/db_dependent/Circulation.t Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt Auto-merging koha-tmpl/intranet-tmpl/prog/js/checkouts.js Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt Auto-merging C4/Items.pm Auto-merging C4/Circulation.pm CONFLICT (content): Merge conflict in C4/Circulation.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 25037: Replace occurences to issues.onsite_checkout The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-25037-Replace-occurences-to-issuesonsitechecko-4HO8b_.patch