Bugzilla – Attachment 174281 Details for
Bug 22421
accountlines.issue_id is missing a foreign key constraint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22421: (QA follow-up) Update API mapping and specs
Bug-22421-QA-follow-up-Update-API-mapping-and-spec.patch (text/plain), 3.93 KB, created by
Martin Renvoize (ashimema)
on 2024-11-08 15:58:51 UTC
(
hide
)
Description:
Bug 22421: (QA follow-up) Update API mapping and specs
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-11-08 15:58:51 UTC
Size:
3.93 KB
patch
obsolete
>From aaaeb6d0b14c39fec75f357cb1ea687a532fe06d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 8 Nov 2024 15:57:39 +0000 >Subject: [PATCH] Bug 22421: (QA follow-up) Update API mapping and specs > >We missed some cases where the API specs and mappings were missing for >the new old_issue_id field. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Account/Credit.pm | 1 + > Koha/Account/Debit.pm | 1 + > Koha/Account/Line.pm | 1 + > api/v1/swagger/definitions/account_line.yaml | 5 +++++ > api/v1/swagger/definitions/debit.yaml | 5 +++++ > t/db_dependent/api/v1/patrons_accounts.t | 2 +- > 6 files changed, 14 insertions(+), 1 deletion(-) > >diff --git a/Koha/Account/Credit.pm b/Koha/Account/Credit.pm >index e3ffa39244b..aed89932e2e 100644 >--- a/Koha/Account/Credit.pm >+++ b/Koha/Account/Credit.pm >@@ -48,6 +48,7 @@ sub to_api_mapping { > borrowernumber => 'patron_id', > branchcode => 'library_id', > issue_id => undef, >+ old_issue_id => undef, > itemnumber => undef, > manager_id => 'user_id', > note => 'internal_note', >diff --git a/Koha/Account/Debit.pm b/Koha/Account/Debit.pm >index e48cd2bffa5..b113003bdad 100644 >--- a/Koha/Account/Debit.pm >+++ b/Koha/Account/Debit.pm >@@ -48,6 +48,7 @@ sub to_api_mapping { > borrowernumber => 'patron_id', > branchcode => 'library_id', > issue_id => 'checkout_id', >+ old_issue_id => 'old_checkout_id', > itemnumber => 'item_id', > manager_id => 'user_id', > note => 'internal_note', >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index 16752ff0329..a82ad434146 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -982,6 +982,7 @@ sub to_api_mapping { > borrowernumber => 'patron_id', > branchcode => 'library_id', > issue_id => 'checkout_id', >+ old_issue_id => 'old_checkout_id', > itemnumber => 'item_id', > manager_id => 'user_id', > note => 'internal_note', >diff --git a/api/v1/swagger/definitions/account_line.yaml b/api/v1/swagger/definitions/account_line.yaml >index cbf71f22b0a..1fe078417c2 100644 >--- a/api/v1/swagger/definitions/account_line.yaml >+++ b/api/v1/swagger/definitions/account_line.yaml >@@ -24,6 +24,11 @@ properties: > - integer > - "null" > description: Internal identifier for the checkout the account line is related to >+ old_checkout_id: >+ type: >+ - integer >+ - "null" >+ description: Internal identifier for the old checkout the account line is related to > credit_number: > type: > - string >diff --git a/api/v1/swagger/definitions/debit.yaml b/api/v1/swagger/definitions/debit.yaml >index c3cc06096f4..07ea7d7884d 100644 >--- a/api/v1/swagger/definitions/debit.yaml >+++ b/api/v1/swagger/definitions/debit.yaml >@@ -23,6 +23,11 @@ properties: > - integer > - "null" > description: Internal identifier for the checkout the account line is related to >+ old_checkout_id: >+ type: >+ - integer >+ - "null" >+ description: Internal identifier for the old checkout the account line is related to > date: > type: string > format: date-time >diff --git a/t/db_dependent/api/v1/patrons_accounts.t b/t/db_dependent/api/v1/patrons_accounts.t >index 6fbb726b7df..31d395ace64 100755 >--- a/t/db_dependent/api/v1/patrons_accounts.t >+++ b/t/db_dependent/api/v1/patrons_accounts.t >@@ -90,7 +90,7 @@ subtest 'get_balance() tests' => sub { > $debit_2->discard_changes; > > $t->get_ok("//$userid:$password@/api/v1/patrons/$patron_id/account") >- ->status_is(200)->json_is( >+ ->status_is(200)->or(sub { diag $t->tx->res->body } )->json_is( > { > balance => 100.01, > outstanding_debits => { >-- >2.47.0
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 22421
:
85773
|
85774
|
85775
|
90352
|
90353
|
90354
|
90359
|
90360
|
90361
|
90362
|
90365
|
90366
|
90367
|
90368
|
161919
|
161920
|
161921
|
161922
|
161923
|
162244
|
162245
|
162246
|
162247
|
162248
|
166631
|
173287
|
173288
|
173289
|
173305
|
173790
|
173791
|
173792
|
173793
|
173794
|
173795
|
173796
|
173797
|
173798
|
173799
| 174281 |
174974