Koha/tools
Jonathan Druart c631fa0924 Bug 11023: Automatic item modification by age (Was Toggle "new" status")
This patch adds:
- a new DB field items.new.
- a new page to configure this new status
  (tools/toggle_new_status.pl).
- a new cronjob script (misc/cronjobs/automatic_item_modification_by_age.pl
was misc/cronjob/toggle_new_status.pl)

Why this status is useful for some libraries ?
The use cases are:
- to know easily what are the new items (with a simple sql query).
- to display an icon in the search results.
- issuing rules can be adapt for new items. Automatically (using the
  cronjob script), the status change (depending the configuration) and
  the item can be issued, for example.
- a RSS/Atom feeds can be created on these new items.

Test plan:
- log in with a librarian having the tools > items_batchmod permission.
- navigate to Home > Tools > Automatic item modifications by age (was: Toggle new status)
- click on the edit button
- there are 3 "blocks":
  * duration: the duration during an item is considered as new.
  * conditions: the status will change only if the conditions are meet.
  * substitutions: if there is no substitution, no action will be done.
    You can add some change to apply to the matching items.
    E.g. ccode=3
         new=''
    If the value is an empty string (in other words, the input does not
    contain anything), the field will be deleted.
  You can create as many rules as you want.
- test the interface : add/remove rule, conditions, substitutions,
  submit the form, edit, etc.
  (There is a looot of JS everywhere, so certainly a looot of bugs...).
- when you have your rules defined, you can now launch the cronjob
  script without any parameter.
  A report will be displayed with the matching itemnumber and the
  substitutions to apply. Verify results are consistent.
- launch the script with the -c argument and verify values have been
  modified depending the substitution rules.

Signed-off-by: juliette et remy <juliette.levast@iepg.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: Add the ability to specify fields from biblioitems table.

Test plan:
Same as before but try with fields from the biblioitems table.

Signed-off-by: juliette et remy <juliette.levast@iepg.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: Add UT for C4::Items::ToggleNewStatus

Test plan:
prove t/db_dependent/Items/ToggleNewStatus.t

Signed-off-by: juliette et remy <juliette.levast@iepg.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: FIX - condition on biblioitems table does not work

If a rule contains a condition on the biblioitems table, the match won't
work. This patch fixes this issue.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: Use DBIx-Class to retrieve column names

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: Don't use the biblioitems fields for the subtitution

It's dangerous to allow a change on the biblioitems fields with this
feature.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: Rename the duration parameter with 'age'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: The age parameter should be a number

The template should check if the age parameter is correctly filled
(should be a number).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023: Change the name of the feature

Originaly this feature only permits to update the "new" field.
Now all item fields can be updated.
The name of the feature is now "Automatic item modifications by age".

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023 [QA Followup]

* Update DB version
* Fix capitalization error
* Rename misc/cronjobs/toggle_new_status.pl to misc/cronjobs/automatic_item_modification_by_age.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 11023 [QA Followup] - Complete the renaming of "toggle new status" to "automatic item modification by age"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-02 22:56:31 +00:00
..
csv-profiles MT2116: Addons to the CSV export 2010-02-17 07:51:33 -05:00
quotes Bug 15684: Fix encoding issues with quote upload 2016-02-04 00:14:43 +00:00
ajax-inventory.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
automatic_item_modification_by_age.pl Bug 11023: Automatic item modification by age (Was Toggle "new" status") 2016-03-02 22:56:31 +00:00
background-job-progress.pl Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax 2015-11-02 12:49:13 -03:00
batch_delete_records.pl Bug 15079: Batch Delete Records Error 2015-11-13 11:26:26 -03:00
batch_record_modification.pl Bug 15579: Fix permission for batch record modification 2016-01-23 18:23:04 +00:00
batch_records_ajax.pl Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
batchMod.pl Bug 14100: Generic solution for language overlay - Item types 2015-10-27 12:34:06 -03:00
cleanborrowers.pl Bug 14544: Get rid of GetSomeShelfNames 2015-11-05 09:58:02 -03:00
copy-holidays.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
csv-profiles.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
exceptionHolidays.pl Bug 14954: Remove C4::Dates from holiday related files in folder tools 2015-11-17 23:44:31 -03:00
export.pl Bug 15923: Take the id list file into account when exporting records 2016-03-02 00:43:11 +00:00
holidays.pl Bug 12072: Make datepicker and templates to be aware of dmydot format 2015-11-19 13:15:19 -03:00
import_borrowers.pl Bug 15014: Returns 0 if everything went fine 2015-11-04 13:32:01 -03:00
inventory.pl Bug 10005: Inventory - Add an option to not check in items 2015-09-16 10:57:56 -03:00
koha-news.pl Bug 14870: (followup) Remove stray C4::Dates 2015-11-19 13:05:06 -03:00
letter.pl Bug 11625: Implement DefaultToLoggedInLibraryNoticesSlips 2015-12-30 11:41:14 +00:00
manage-marc-import.pl Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
marc_modification_templates.pl Bug 14098: Add copy_and_replace action to MMT 2015-09-07 11:17:13 -03:00
modborrowers.pl Bug 12636: Do not display unique patron attributes in the batch patron modification 2016-01-27 20:52:36 +00:00
newHolidays.pl Bug 14954: Remove C4::Dates from holiday related files in folder tools 2015-11-17 23:44:31 -03:00
overduerules.pl Bug 15295: (follow-up) Koha::Libraries - Remove GetBranchesCount 2016-01-19 12:31:27 +00:00
picture-upload.pl Bug 14338: Unable to delete patron images 2015-06-11 10:08:59 -03:00
quotes-upload.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
quotes.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
scheduler.pl Bug 13813: Remove deprecated module C4::Dates from system 2015-09-18 12:40:55 -03:00
showdiffmarc.pl Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
stage-marc-import.pl Bug 15005: Replace $ENV{SCRIPT_NAME} with the hardcoded script paths 2015-10-19 09:36:43 -03:00
tools-home.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
upload-cover-image.pl Bug 14321: Integrate Upload.pm into Koha 2015-09-25 12:02:52 -03:00
upload-file.pl Bug 14321: [QA Follow-up] Changes for Upload.pm and upload-file.pl 2015-09-25 12:02:52 -03:00
upload.pl Bug 14321: Integrate Upload.pm into Koha 2015-09-25 12:02:52 -03:00
viewlog.pl Bug 15542: Always display the patron's info the same way. 2016-01-23 19:15:08 +00:00