Bug 27714 - Koha::NewsItem->author explodes if the author has been removed
Summary: Koha::NewsItem->author explodes if the author has been removed
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 24398
Blocks: 22544
  Show dependency treegraph
 
Reported: 2021-02-17 11:03 UTC by Jonathan Druart
Modified: 2021-03-23 19:51 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
This fixes the cause of errors occurring for the display of news items where the author of no longer exists in Koha.
Version(s) released in:
21.05.00,20.11.04,20.05.10


Attachments
Bug 27714: Prevent Koha::NewsItem->author to explode (2.15 KB, patch)
2021-02-17 11:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27714: Prevent Koha::NewsItem->author to explode (2.20 KB, patch)
2021-02-18 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27714: Prevent Koha::NewsItem->author to explode (2.29 KB, patch)
2021-02-19 07:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-02-17 11:03:38 UTC

    
Comment 1 Jonathan Druart 2021-02-17 11:05:06 UTC
Created attachment 116932 [details] [review]
Bug 27714: Prevent Koha::NewsItem->author to explode

If the author of a news has been removed, Koha::NewsItem->author must
not explode

DBIC result _type  isn't of the _type Borrower at t/db_dependent/Koha/News.t line 68.

Test plan:
 prove t/db_dependent/Koha/News.t
must return green, and changes must be consistent
Comment 2 David Nind 2021-02-18 16:40:10 UTC
Created attachment 117005 [details] [review]
Bug 27714: Prevent Koha::NewsItem->author to explode

If the author of a news has been removed, Koha::NewsItem->author must
not explode

DBIC result _type  isn't of the _type Borrower at t/db_dependent/Koha/News.t line 68.

Test plan:
 prove t/db_dependent/Koha/News.t
must return green, and changes must be consistent

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2021-02-19 07:30:08 UTC
Created attachment 117019 [details] [review]
Bug 27714: Prevent Koha::NewsItem->author to explode

If the author of a news has been removed, Koha::NewsItem->author must
not explode

DBIC result _type  isn't of the _type Borrower at t/db_dependent/Koha/News.t line 68.

Test plan:
 prove t/db_dependent/Koha/News.t
must return green, and changes must be consistent

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Jonathan Druart 2021-02-23 12:22:25 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-02-25 09:39:55 UTC
Pushed to 20.11.x for 20.11.04
Comment 6 Andrew Fuerste-Henry 2021-03-05 14:23:48 UTC
Pushed to 20.05.x for 20.05.10
Comment 7 Victor Grousset/tuxayo 2021-03-19 00:04:03 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.