Bug 29125 - Use Koha::Patron object in C4:Utils::DataTables::Members.pm
Summary: Use Koha::Patron object in C4:Utils::DataTables::Members.pm
Status: RESOLVED DUPLICATE of bug 30063
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on: 30060
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-27 14:20 UTC by Nick Clemens (kidclamp)
Modified: 2022-03-17 14:48 UTC (History)
3 users (show)

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


Attachments
Bug 29125: Add primary key to user_permissions table (2.53 KB, patch)
2021-09-27 18:38 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 29125: DBIC updates (3.75 KB, patch)
2021-09-27 18:38 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 29125: Use patron objects in C4::Utils::DataTables::Members.pm (10.80 KB, patch)
2021-09-27 18:38 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 29125: Fix 'Unknown column' (1.12 KB, patch)
2021-10-08 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2021-09-27 14:20:37 UTC
Currently we do a SQL search for patrons, then fetch the patron object for each borrowernumber individually, then fetch related objects

If we use Koha::Patrons directly we can prefetch related object and reduce the number of calls to the DB
Comment 1 Nick Clemens (kidclamp) 2021-09-27 18:38:16 UTC
Created attachment 125374 [details] [review]
Bug 29125: Add primary key to user_permissions table
Comment 2 Nick Clemens (kidclamp) 2021-09-27 18:38:19 UTC
Created attachment 125375 [details] [review]
Bug 29125: DBIC updates
Comment 3 Nick Clemens (kidclamp) 2021-09-27 18:38:22 UTC
Created attachment 125376 [details] [review]
Bug 29125: Use patron objects in C4::Utils::DataTables::Members.pm
Comment 4 Jonathan Druart 2021-10-08 14:38:27 UTC
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.`surname`' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 335

To recreate
/cgi-bin/koha/members/members-home.pl
Search for: "koh"
Search field: "surname"
Click "Search"
Comment 5 Jonathan Druart 2021-10-08 14:46:53 UTC
Created attachment 125979 [details] [review]
Bug 29125: Fix 'Unknown column'
Comment 6 Jonathan Druart 2022-02-09 09:37:15 UTC
Bug 30055 will make this bug obsolete.
Comment 7 Jonathan Druart 2022-02-09 12:52:56 UTC
I am going to move the following patch to bug 30060:
Bug 29125: Add primary key to user_permissions table
Comment 8 Jonathan Druart 2022-03-17 14:48:40 UTC

*** This bug has been marked as a duplicate of bug 30063 ***