[Koha-bugs] [Bug 7157] Improve the j2a.pl cronjob

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 8 00:36:09 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7157

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6209|0                           |1
        is obsolete|                            |

--- Comment #2 from Chris Cormack <chris at bigballofwax.co.nz> 2011-11-07 23:36:09 UTC ---
Created attachment 6250
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6250
Bug 7157 - Improve the j2a.pl cronjob

- Calculates updates date based on the upper age limit defined in the patron
categories.
- Allows libraries to work on all branches or only one.
- Allows libraries to specify which Adult patron category to update child
categories to.
- Allows libraries to specify a single Child patron category to update to an
adult category.
- Has a test mode to display what transforms would be done on the database
without executing the changes.

Includes improved help, copyright statement, and uses warnings.

To test:

Create two patron categories, a child and an adult category. Make sure they
have an upper age limit.

Create or modify some patrons in multiple branches that fall into the category
of "my birthdate is less than or equal to today's date minus the upper age
limit"

1. Run the script with no flags - nothing should  happen, it will suggest you
try the -help flag.
2. Run the script with the -help flag - you should see the help
3. Run the script with the -fromcat=<child category> -tocat=<adult category> -v
-n - should show you results from all branches but take no action and tell you
what its computations are.
4. Run the script with the -fromcat=<child category> -tocat=<adult category>
-branch=<branchcode> -v -n - should show you results from your specified
branch, but take no action and tell you what it's computations are.
5. Run the script with the -fromcat=<child category> -tocat=<adult category> -v
-branch=<branchcode> - should show you the computations and tell you how many
patrons were modified in your single branch. It will not show you the
information on which patrons were updated.
6. Run the script with the -fromcat=<child category> -tocat=<adult category> -v
- should show you the computations and tell you how many patrons were modified
across all branches.
7. Run the script without the -v flag, if you care what the non-verbose output
looks like.

There is more this script could do, please feel free to take it and run.

Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list