Bugzilla – Attachment 136461 Details for
Bug 24239
Let the ILL module set ad hoc hard due dates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24239: (QA follow-up) Rename date_due => due_date
Bug-24239-QA-follow-up-Rename-datedue--duedate.patch (text/plain), 4.70 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-06-23 18:45:54 UTC
(
hide
)
Description:
Bug 24239: (QA follow-up) Rename date_due => due_date
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-06-23 18:45:54 UTC
Size:
4.70 KB
patch
obsolete
>From ed1a8812c1434901545971e2c8d56f0a55dd15aa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 23 Jun 2022 15:43:18 -0300 >Subject: [PATCH] Bug 24239: (QA follow-up) Rename date_due => due_date > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Circulation.pm | 6 +++--- > .../atomicupdate/bug_24239-add_date_due_to_illrequests.pl | 4 ++-- > installer/data/mysql/kohastructure.sql | 2 +- > t/db_dependent/Circulation.t | 6 +++--- > 4 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 223013a1a9..457f9e5b5a 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1552,11 +1552,11 @@ sub AddIssue { > biblio_id => $item_object->biblionumber, > borrowernumber => $borrower->{'borrowernumber'}, > completed => undef, >- date_due => { '!=', undef }, >+ due_date => { '!=', undef }, > })->next; > >- if ( $ill_request and length( $ill_request->date_due ) > 0 ) { >- my $ill_dt = dt_from_string( $ill_request->date_due ); >+ if ( $ill_request and length( $ill_request->due_date ) > 0 ) { >+ my $ill_dt = dt_from_string( $ill_request->due_date ); > $ill_dt->set_hour(23); > $ill_dt->set_minute(59); > $datedue = $ill_dt; >diff --git a/installer/data/mysql/atomicupdate/bug_24239-add_date_due_to_illrequests.pl b/installer/data/mysql/atomicupdate/bug_24239-add_date_due_to_illrequests.pl >index a8eb9beda1..bdbbe404d3 100755 >--- a/installer/data/mysql/atomicupdate/bug_24239-add_date_due_to_illrequests.pl >+++ b/installer/data/mysql/atomicupdate/bug_24239-add_date_due_to_illrequests.pl >@@ -2,14 +2,14 @@ use Modern::Perl; > > return { > bug_number => "24239", >- description => "Add date_due to illrequests", >+ description => "Add due_date to illrequests", > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; > # Do you stuffs here > $dbh->do(q{ > ALTER TABLE `illrequests` >- ADD `date_due` datetime DEFAULT NULL AFTER `biblio_id` >+ ADD `due_date` datetime DEFAULT NULL AFTER `biblio_id` > }); > }, > }; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 93e06cbbc9..027ca181c0 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2792,7 +2792,7 @@ CREATE TABLE `illrequests` ( > `illrequest_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ILL request number', > `borrowernumber` int(11) DEFAULT NULL COMMENT 'Patron associated with request', > `biblio_id` int(11) DEFAULT NULL COMMENT 'Potential bib linked to request', >- `date_due` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation', >+ `due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation', > `branchcode` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The branch associated with the request', > `status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Current Koha status of request', > `status_alias` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Foreign key to relevant authorised_values.authorised_value', >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index eb9e296fbf..e2a1d5dbf9 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -2151,7 +2151,7 @@ subtest 'AddIssue | recalls' => sub { > AddReturn( $item->barcode, $item->homebranch ); > }; > >-subtest 'AddIssue & illrequests.date_due' => sub { >+subtest 'AddIssue & illrequests.due_date' => sub { > plan tests => 2; > > t::lib::Mocks::mock_preference( 'ILLModule', 1 ); >@@ -2167,7 +2167,7 @@ subtest 'AddIssue & illrequests.date_due' => sub { > borrowernumber => $patron->borrowernumber, > biblio_id => $item->biblionumber, > branchcode => $library->{'branchcode'}, >- date_due => $custom_date_due, >+ due_date => $custom_date_due, > })->store; > > my $issue = AddIssue( $patron->unblessed, $item->barcode ); >@@ -2181,7 +2181,7 @@ subtest 'AddIssue & illrequests.date_due' => sub { > borrowernumber => $patron->borrowernumber, > biblio_id => $item->biblionumber, > branchcode => $library->{'branchcode'}, >- date_due => $custom_date_due, >+ due_date => $custom_date_due, > })->store; > > $issue = AddIssue( $patron->unblessed, $item->barcode ); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24239
:
96246
|
106409
|
130056
|
130057
|
130414
|
130415
|
130416
|
133475
|
133476
|
133477
|
135244
|
135245
|
135246
|
135943
|
135944
|
135945
|
136458
|
136459
|
136460
| 136461 |
136462
|
136463