https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37344

--- Comment #7 from Victor Grousset/tuxayo <[email protected]> ---
Comment on attachment 179489
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179489
Bug 37344: Add a real solution for discharge cancellation

Review of attachment 179489:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=37344&attachment=179489)
-----------------------------------------------------------------

::: installer/data/mysql/atomicupdate/bug_37344.pl
@@ +2,5 @@
> +use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
> +
> +return {
> +    bug_number  => "37344",
> +    description => "Add columns cancellation_reason and cancellation_date to 
> discharge",

Old name is still mentioned: cancellation_date.

@@ +20,5 @@
> +
> +            $dbh->do(
> +                q{
> +                    INSERT IGNORE INTO authorised_value_categories 
> (category_name) VALUES
> +                    ('DISCHARGE_CANCELLATION')

There is divergence between an existing install and a new install. The
insertion of the authorised_value stuff is only on existing installs. New ones
won't have it.

@@ +26,5 @@
> +            );
> +            $dbh->do(
> +                q{
> +                    INSERT IGNORE INTO authorised_values (category, 
> authorised_value, lib) VALUES
> +                    ('DISCHARGE_CANCELLATION','BORROWER_MISTAKE', 'Borrower 
> asked a discharge by mistake'),

Terminology issue: https://wiki.koha-community.org/wiki/Terminology#P

We keep "borrower" when it's existing stuff that would need refactor elsewhere
and mess with SQL reports. So here when introducing new stuff, there is
constraint to keep using "borrower".

And there is a user facing string here also. They don't have technical
constraints and we can always use the current terminology.

@@ +36,5 @@
> +            # tables
> +            say $out "Added column 'discharges.cancelled'";
> +            say $out "Added column 'discharges.cancellation_reason'";
> +            say $out "Added authorized values";
> +            say $out "Added authorized values";

Duplicate line?

::: installer/data/mysql/kohastructure.sql
@@ +2872,5 @@
>    `borrower` int(11) DEFAULT NULL,
>    `needed` timestamp NULL DEFAULT NULL,
>    `validated` timestamp NULL DEFAULT NULL,
> +  `cancelled` timestamp DEFAULT NULL,
> +  `cancellation_reason`varchar(32) DEFAULT NULL,

Divergence with dbrev on length.

----

If I understand correctly, the only data in this column will be from the
DISCHARGE_CANCELLATION authorised values. If so, a comment would help document
this.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to