nyuuzyou/wikis huggingface dataset:
Add use warnings to all scripts and modules RFC

== RFC: add 'use warnings' to all Perl scripts and modules ==
Perl's warnings pragma is the cheapest way to find bugs. We already use the strict pragma; now it's time to add warnings. More importantly, it's time to review the messages produced by the warnings pragma and fix the underlying issues.
To reiterate, this RFC has two goals: turning on warnings, and fixing all warnings thus reported. Doing the first without the second will simply cause Apache logs to overflow.
Ideally, all Perl scripts and modules should have warnings enabled by the time 3.2 is released.
=== Details ===
I propose the following steps to implement this:
# Update the coding guidelines to require 'use strict' and 'use warnings'.
# For any new scripts and modules, require 'use warnings'. Since Koha (per Makefile.PL) requires at least Perl 5.6.1, the 'use warnings' pragma should be used instead of -w.
# Systematically go through and turn on warnings for each script and module. 
# Unsystematically turn on warnings. I.e., whenever you patch a particular script, consider following up with a separate patch to turn on warnings. I suggest a separate patch because turning on warnings is not enough; you should run the script through its paces and fix any problems reported by the warnings pragma. For modules in C4, note that this can be a big commitment: turning on warnings means testing every function and method.
# Create a standing blocker bug for 3.2 for adding "use warnings".
# "no warnings" should not be used absent a detailed comment explaining why warnings should be turned off within a block and why it is not possible to change the code to avoid the warning. It might be acceptable for temporary use while turning on warnings in a big module
Category:Architecture,_internals,_and_plumbing_RFCs
Category:Koha_3.2_RFCs
Category:3.2
Adding a facet in elasticsearch

Facet types are still hardcoded in ElasticSearch implementation in Koha,there are a number of steps in order to add a new faceted field to the current list there are a number of places that need to be edited:
1 - First we should add the facet in to the default mapping file admin/searchengine/elasticsearch/mappings.yaml
@@ -1255,6 +1255,15 @@ biblios:
 sort: ~
 suggestible: ''
 type: ''
+ ccode:
+ label: collection-code
+ mappings:
+ - facet: '1'
+ marc_field: '9528'
+ marc_type: marc21
+ sort: ~
+ suggestible: ''
+ type: ''
 control-number:
2 - in sub _convert_facets in Koha/SearchEngine/ElasticSearch/Search.pm you must add the facet code and a description for the template to pickup:
 se => { order => 5, label => 'Series', },
 subject => { order => 6, label => 'Topics', },
+ ccode => { order => 7, label => 'CollectionCodes',},
 );
3 - In Koha/SearchEngine/ElasticSearch/QueryBuilder.pm you must add the facet into the form that is sent to ElasticSearch in order to retrieve the new facet from the index
@@ -118,6 +118,7 @@ sub build_query {
 location => { terms => { field => "homebranch__facet" } },
 'su-geo' => { terms => { field => "su-geo__facet" } },
 se => { terms => { field => "se__facet" } },
+ ccode => { terms => { field => "ccode__facet" } },
 };
4 - In the template make sure the facets are picked up, labeled correctly, and actually displayed: koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc && koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc 
@@ -20,6 +20,7 @@
 [% IF ( facets_loo.type_label_HomeLibrary ) %]Home libraries[% END %]
 [% IF ( facets_loo.type_label_HoldingLibrary ) %]Holding libraries[% END %]
 [% IF facets_loo.type_label_Location %]Locations[% END %]
+[% IF facets_loo.type_label_CollectionCodes %]Collections[% END %]
This is all good for a new database, however,for existing database we also need to add the mapping into the DB directly:
INSERT INTO search_field (name, label, type) VALUES ('ccode','ccode','string');
INSERT INTO search_marc_map (index_name,marc_type,marc_field) VALUES ('biblios','marc21','9528');
INSERT INTO search_marc_to_field (search_marc_map_id,search_field_id,facet,suggestible,sort) VALUES (4966,77,1,0,NULL);
In the last statement replace the number with the relevant ids as created above
Or, easier, delete your mappings and force reload using the trick from bug 14899(one it is pushed):
For developers only at the moment, if you want to reset your mappings, you can hit:
 admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
Patches to follow on Bug 17169 as examples
Admin Kuhn GmbH

The Swiss company Admin Kuhn GmbH was started in June 2012 by Michael Kuhn.
Originally a librarian but 12 years working for ILS vendors (SISIS, OCLC PICA, OCLC) Michael was always interested in Koha and started to actually learn it when he established his own company in 2012. Eventually in 2015 he began migrating his first libraries to Koha:
* Bibliothek des Wissenschaftsparks Albert Einstein
* Stadtbibliothek Treuchtlingen
* Musikbibliothek des Chorverband in der Evangelischen Kirche im Rheinland
* Stiftsbibliothek des Klosters Einsiedeln
He is currently working with a lot of different libraries in the German speaking area (see http://adminkuhn.ch/wiki/Referenzliste), not only with Koha but always trying to support the libraries with what they really need.
In September 2016 he published the Koha content of his proprietary homepage in extended form under the license CC BY-SA 3.0 and called it Koha-de-Wiki since the new wiki is dedicated to German speaking users.
Website	http://adminkuhn.ch/
E-Mail 	mik [at] adminkuhn.ch
Phone 	+41 (0)61 261 55 61
Category:Support_Companies
Advanced Invoicing RFC

= Phase 1 =
== Database Changes ==
aqinvoice_lines
A new table to store the broken down charges:
* aqinvoices_invoiceid (foreign key references aqinvoices.invoiceid)
* aqorders_ordernumber (foreign key references aqorders.ordernumber)
* type (authorized value)
* description (freetext alternate to above)
* quantity (quantity of items/services covered by this line)
* budget_id (nullable foreign key references aqbudgets)
* list_price (nullable decimal - pre tax value of this line)
* discount_rate (nullable decimal - percentage discount to be applied to this line)
* discount_amount (nullable decimal - amount to reduce the list_price by when applying the discount)
* pre_tax_amount (nullable decimal - pre_tax_amount after any discounts have been applied - may be calculated for display as required using post_tax and tax_rate)
* tax_rate (nullable decimal - may be calculated for display as required using pre_tax and post_tax)
* tax_amount (nullable decimal - amount to pay in tax - may be calculated for display as required using pre_tax_amount and tax_rate)
* total_amount (nullable decimal - final amount to be paid after discounts and taxes have been applied - may be calculated for display using previous fields)
* sort_key (integer - should we allow ordering of these lines for display?)
== System Preferences ==
* Add a new preference to switch to 'advanced invoicing' or continue using the existing invoice implementation.
== UI ==
* Add ability to define invoice lines on the order receive page.
* Add display of invoice lines to the invoice summary table.
= Phase 2 =
* Add ability to define invoice line templates to allow the quick addition of similar lines.
* Add ability to assign funds at the invoice line level.
= Phase 3 =
* Add the ability to independently invoice and receive, rather than requiring receipting as part of the invoicing step.
* Add ability to assign multiple funds, split by a given ratio, at the invoice line level.
* Expose partial invoices on order recieve page.
Category:Acquisitions_RFCs
Advanced cataloging search RFC

For 3.2, Howard County Library proposes adding the same advanced search options that you find on the Search > Advanced Search page on the Koha staff side to the Cataloging search accessible under the “More” menu.
In addition to all of those fields it is also necessary to search by:
* Biblio#
* Control# (from the 001 MARC bibliographic tag)
* LCCN (from the 010 MARC bibliographic tag)
* Music# (from the 028 and maybe 037 - MARC bibliographic tags)
It is also desired to add the option to include a “Sort By:” drop-down menu on the search results screen, and have the same sorting options available right from the advanced catalog search. This sorting functionality would mimic the functionality currently found under Search > Advanced Search.
Category:Searching_RFCs
Category:Koha_3.4_RFCs
Advanced editor macros endpoint RFC

This RFC should be the basis for writing an endpoint for CRUD operations on advanced editor macros following the guidelines. The implementation will be handled in bug 17268
== Actions and routes ==
The following table presents the proposed routes and actions mappings to be implemented.
{| border="1"
 |Description || Action
 |-
 |List macros || GET /advanced_editor/macros
 |-
 |Add a macro || POST /advanced_editor/macros
 |-
 |Add a shared macro || POST /advanced_editor/macros/shared
 |-
 |Get a macro || GET /advanced_editor/macros/{macro_id}
 |-
 |Get a shared macro || GET /advanced_editor/macros/shared/{macro_id}
 |-
 |Update a macro || PUT /advanced_editor/macros/{macro_id}
 |-
 |Update a shared macro || PUT /advanced_editor/macros/shared/{macro_id}
 |-
 |Delete a macro || DELETE /advanced_editor/macros/{macro_id}
 |-
 |Delete a shared macro || DELETE /advanced_editor/macros/shared/{macro_id}
 |-
== Order object definition ==
DB schema 	Proposed API	Details
id 	macro_id 	Generated on POST
name 	name 	
macro 	macro_text 	
borrowernumber	patron_id 	
shared 	shared 	
== Comments ==
* Route: I would suggest /advanced_editor/macros
--tcohen 16:36, 10 April 2018 (EDT)
Category:RFCs
Advanced patron search RFC

== RFC Advanced Patron Search ==
=== Problem ===
The ability is needed to search for patrons on many different fields, including email address, street address, phone number, etc. Using additional patron attributes is not a viable solution as it would require a tremendous amount of duplicate data on all fields that would need to be searchable.
=== Solution #1 ===
Create a standard search API that functions for both circulation and patron searches and supports the ability to search on many different fields.
=== Solution #2 ===
Create a member search API that supports the ability to search for patrons on many different fields.
=== Technical Notes ===
* Advanced search should include the following fields
** Surname
** First name 
** Date of birth
** Patron #
** Guarantor Surname
** Guarantor First name
** Address
** City, state
** Zip/Post code
** Each type of phone number
** Each type of email
** Card number
** Patron Category
** Any searchable additional patron attributes
* When a Staff member clicks on the Patron menu item, they should immediately be taken to the advanced search screen, which could exist below the browse by last name. This display would be in a similar format to what Staff see when they click on the Search menu item.
=== Related Enhancements ===
* Create a system preference for what fields the quick search searches. The creation of an advanced patron search would allow for the separation of searchable additional patron attributes and the quick search box because searchable additional patron attributes would be searched using the advanced search.
=== Comments ===
Category:Abandoned_RFC
Age restriction

== Use case ==
Public libraries and school libraries often have to deal with a lot of age restrictions, e.g. with FSK (see www.fsk.de) or PEGI (Pan European Game Information, see www.pegi.info) and/or with regional rules regarding movies (virtually every canton in Switzerland has it's own rules). 
The classic way to implement age restrictions is to make use of a lot of categories. This gets soon very complicated, and it is not easy to maintain. 
The functionality submitted with Bug 7621 provides an easy way to match age restriction on biblio records (e.g. on field 521a in MARC 21 and 333a in UNIMARC) against the patron's age.
== Set up age restriction ==
=== Availability ===
Note: The functionality is not (yet) available in Koha 3.8x (21 June 2012). To make use of it you have to apply the patch provided by Bug 7621. 
If you use the patch, make sure that you have a column 'agerestriction' in table biblioitems. This will be handled by updatedatabase.pl. If you want to insert the column using mysql, you can do:
ALTER TABLE biblioitems ADD COLUMN 'agerestriction' VARCHAR(255) DEFAULT NULL AFTER 'cn_sort' 
=== Koha to MARC mapping ===
In staff client, go to Home . Administration . Koha to MARC mapping and choose biblioitems + OK.
Locate the field 'agerestriction'. Edit it and map the field e.g. to: 521a (MARC 21) or 333a (UNIMARC)
=== System preferences ===
In staff client, go to Home . Administration . System preferences and edit 
*Circulation: AgeRestrictionMarker (add eg.: FSK|PEGI|Age)
*Circulation: AgeRestrictionOverride (Prevent or Don't prevent)
=== Edit biblio record(s) ===
Create or edit biblio records with e.g. values FSK 16 or Age 8 in the field 521a (same field as mapped above).
=== Try to checkout to young patron ===
If the patron is younger than allowed, checkout is blocked or issues a warning with the possibility to override (depending on AgeRestrictionOverride).
Category:Library_System_Modules
Category:Circulation
Alert staff when unsaved changes have been made RFC

== RFC Alert staff when unsaved changes have been made ==
Anytime a staff person has modified data in any form on the staff side of Koha and then attempts to leave the page by either clicking on another link or using the browser back button, they should be alerted that they have made changes that have not been saved. The alert box should give the staff the option to either "Continue without saving" or "Cancel".
=== Technical Notes ===
* System preference should be added to disable or enable this feature
Category:Abandoned_RFC
Allow override of recall when placing reserve

Normally you cannot place a reserve on an item if a recall for that patron already exists on that biblio. This feature adds the ability to override a recall restriction when placing a reserve, sponsored by Waikato Institute of Technology.
=== Getting started ===
We need two borrowers - Borrower A and Borrower B.
We need a biblio with an item that can be recalled (based on your circulation rules).
The AllowHoldPolicyOverride system preference MUST be enabled.
=== Test plan ===
#Check out the item to Borrower A.
#Log into the OPAC as Borrower B and place a recall on the same item.
#Go back to the staff client. Attempt to place a reserve on that item for Borrower B.
#Note that there is an alert "Cannot place reserve" because of the existing recall, however the 'Place hold' button should still be clickable with a warning sign.
#Click the 'Place hold' button, accept the confirmation to allow the reserve
#Confirm the reserve is added.
=== Other links ===
Go back to main recalls page
Alternatives for help files

Currently the Koha project maintains documentation for users in three places: The manual, the help files included with Koha and the wiki. There is probably a big overlap between the manual and the help files. 
There are a few proposals for changing how the built-in help files work: 
* Bug 11115 - Pull help files from the manual
* Bug 14234 - Include the user manual with Koha package
* Bug 15003 - Help should be a wiki, not translatable via po-files
* Bug 18483 - Customised help: Enhance staff client with news based, easily editable help system
** Bug 18515 - Use news based help system for OPAC
* Bug 19381 - Replace the built-in help files with links to the online manual
Could we agree on one way going forward, and concentrate our efforts on it? 
Category:Development
Aprils fools

== Pony attack, recorded for posterity ==
=== Known victims ===
https://web.archive.org/web/20190401122738/https://demo.biblibre.com/
https://web.archive.org/web/20190401122855/https://catalog.bywatersolutions.com/
=== Code found on these demos ===
OpacMainUserBlock
<iframe src="https://panzi.github.io/Browser-Ponies/ponies-iframe.html#fadeDuration=500&volume=1&fps=25&speed=3&audioEnabled=false&showFps=false&showLoadProgress=true&speakProbability=0.1&spawn.applejack=1&spawn.fluttershy=1&spawn.pinkie%20pie=1&spawn.rainbow%20dash=1&spawn.rarity=1&spawn.twilight%20sparkle=1&spawnRandom=1&paddock=true&grass=true" style="overflow:hidden;border-style:none;margin:0;padding:0;background:transparent;width:640px;480px;" width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
OPACUserCSS
body, .main, #wrap {
 background: pink;
 color: yellow;
 font-weight: bold;
}
a, legend {
 color: yellow !important;
 font-weight: bold;
}
#moresearches ul li a, select {
 color: pink !important;
 font-weight: bold;
}
#searchsubmit {
 display: none;
}
opacheader
Welcome to My Library Publik !
Borrowing is magic ...
LibraryName
MLP: My Library Publik - Borrowing is magic -
Architecture

I really would like to read about (koha) software architecture.
Is there someone willing to start this page?
May be architectural questions are raised under a different search term - then I would like to find orientation / links here.
Searching for architecture currently returns a very poor result...
to give contents a start (structure derived from ):
== Koha from a Users Perspective ==
== Koha from a Programmers Perspective ==
== Koha Process View ==
== Koha as Seen by a System Engineer ==
== Koha Scenarios ==
Category:Guidelines
Category:Architecture,_internals,_and_plumbing_RFCs
Category:Koha_Documention_Component_RFCs
Authorised values endpoint RFC

This RFC should be the basis for writing an endpoint for CRUD operations on order lines following the guidelines. The implementation will be handled in Bug 17390
== Actions and routes ==
The following table presents the proposed routes and actions mappings to be implemented.
Description 	Action
List authorised values categories 	GET /authorised_values_categories
Add authorised values category 	POST /authorised_values_categories
Get an authorised values category 	GET /authorised_values_categories/{authorised_values_category_id}
Delete authorised values category 	DELETE /authorised_values_categories/{authorised_values_category_id}
List authorised category values 	GET /authorised_values_categories/{authorised_values_category_id}/authorised_values
Add authorised value to a category	POST /authorised_values_categories/{authorised_values_category_id}/authorised_values
Overwrite authorised value 	PUT /authorised_values_categories/{authorised_values_category_id}/authorised_values/{authorised_value_id}
Delete authorised value 	DELETE /authorised_values_categories/{authorised_values_category_id}/authorised_values/{authorised_value_id}
Partially update authorised value 	PATCH /authorised_values_categories/{authorised_values_category_id}/authorised_values/{authorised_value_id}
== Authorised value object definition ==
DB schema 	Proposed API 	Details
id 	authorised_value_id	Generated on POST
category 	category 	
authorised_value	value 	
lib 	description 	
lib_opac 	opac_description 	
imageurl 	image_url 	
NONE 	library_limits 	List of library_id for the value's library limits
== Authorised value category object definition ==
DB schema	Proposed API	Details
category 	category 	
It should be able to embed its authorised_values.
== Comments ==
-- tcohen: library limits, description translations. We need to think about it
Category:RFCs
Authority control improvements RFC

==3.2 RFC: Authority control enhancements==
For 3.2, LibLime proposes to add the following authority control enhancements:
# An integrated headings browse that includes authorized and unauthorized headings from bibs and authorities in a single list.
# Uniform title indexing of the 100/240 field (MARC21).
# Keyword indexing enrichment with cross-references.
# Faceting enrichment using see-also references.
# An authority validation form for both bibliographic and authority records. This form will be available both for interactive cataloging and while importing records. 
# When bibliographic records are staged for import, there will be an indication that there are potential authority control problems. 
# Authority records will be batch loaded just like bib records.
# When authority records are staged for import, there will be an indication that there are potential authority control problems.
# Reporting of potential authority control problems.
Category:Abandoned_RFC
Availability endpoints RFC

== Relevant bugs ==
13927: Add API route to check hold capabilities (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13927)
16825: Add API route for getting an item (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16825)
16826: REST API: Add API routes for getting item availability and holdability (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16826)
== Actions and routes ==
Description 	Action	Proposed path
Get checkout availibility for an object	GET 	/<object>/{object_id}/allows_checkout
Get hold availibility for an object 	GET 	/<object>/{object_id}/allows_hold
Get availibility for an object 	GET 	/<object>/{object_id}/allows_all
Where <object> could be:
* biblios
* items
== Query params ==
* patron_id - finds availability for a patron
* library_id - limits results by library
without any param it return general/anonymous availability in all libraries
== Response ==
200 and object describing avaiability
== Comments ==
Category:RFCs
Background indexing with Zebra

NOTE: These instructions are incredibly old and talk about an unsupported version of Koha.. 
Note: This instructions apply to source install of Koha 3.12 onwards. If you want to use it in a previous version, please refer to the download instructions on the bottom of this page. If you need/want to use this feature in koha-common packages installs take a look at bug 8773 and help us testing and signing.
== Install Tamil's indexer ==
In order to have background indexing in your Koha setup you need to use an indexer daemon written by Frédéric Demians which is included in the Koha::Contrib::Tamil perl package (outside Koha).
Install Tamil's package. For Debian-based operating systems (Debian, Ubuntu, etc.) use the Koha repository (squeeze-dev):
sudo apt-get install libkoha-contrib-tamil-perl
Otherwise, use cpan:
sudo cpan Koha::Contrib::Tamil
== Setup the startup service ==
After that you need to set the daemon to run on startup:
 sudo ln -s /usr/share/koha/bin/koha-index-daemon-ctl.sh /etc/init.d/koha-index-daemon
 sudo update-rc.d koha-index-daemon defaults
 sudo service koha-index-daemon start
== Handy tools included ==
After you installed Koha::Contrib::Tamil you will have a few new commands you can use:
 
* koha-index
* koha-index-daemon
You can access their respective man pages:
 man koha-index
 man koha-index-daemon
koha-index will help you reindex your zebra DB anytime you need it like this (standard env variable being set): 
 koha-index --verbose
 koha-index --source authority --verbose
== Pre-3.12 users ==
As the needed script is not included in previous versions you need to download it from here and place it on the /usr/share/koha/bin dir (change if not standard setup).
After dowloading please fix the scripts variables like this
 USER=koha
 GROUP=koha
 DBNAME=your_kohas_db_name
 NAME=koha-index-daemon-ctl-$DBNAME
 LOGDIR=/var/log/koha
 PERL5LIB=/usr/share/koha/lib
 KOHA_CONF=/etc/koha/koha-conf.xml
 ERRLOG=$LOGDIR/koha-index-daemon.err
 STDOUT=$LOGDIR/koha-index-daemon.log
 OUTPUT=$LOGDIR/koha-index-daemon-output.log
Category:Zebra