Bug 31110 - Use `_should_be_fk` for ReturnClaim in TestBuilder
Summary: Use `_should_be_fk` for ReturnClaim in TestBuilder
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 29495
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-06 14:56 UTC by Martin Renvoize
Modified: 2023-06-08 22:26 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 31110: Move 'ReturnClaim.issue_id' to _should_be_fk (1.68 KB, patch)
2022-07-06 15:02 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2022-07-06 14:56:21 UTC
In bug 29495 we added a follow-up to fix the TestBuilder test.  However, we added the change to the wrong place; Instead of forcing undefined in the test data and not creating a link, we should add the field lacking a proper foreign key to the list in _should_be_fk

These are deliberately not foreign keys because they link to one of two tables.. the original and old_ version tables.. but we do add dbix::class relations for the link.
Comment 1 Martin Renvoize 2022-07-06 15:02:03 UTC
Created attachment 137216 [details] [review]
Bug 31110: Move 'ReturnClaim.issue_id' to _should_be_fk

This patch moves the issue_id field definition for ReturnClaim in
TestBuilder to the list of 'fake' keys in _should_be_fk.

Test plan
1) Run t/db_dependent/TestBuilder.t before applying the patch
2) Run t/db_dependent/TestBuilder.t after applying the patch
3) Signoff if the test passes both times.
Comment 2 Tomás Cohen Arazi 2022-07-06 15:31:01 UTC
It doesn't apply on master, and when fixing it I get the error for CheckoutRenewal back!
Comment 3 Martin Renvoize 2022-07-06 17:27:10 UTC
Weird.. it passed before we made the same change for CheckoutRenewals.. seems we can't add the same thing twice.

We can certainly leave this one as is for now..