[Koha-bugs] [Bug 14224] patron notes about item shown at check in

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 25 08:43:35 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14224

--- Comment #14 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Aleisha Amohia from comment #13)
> (In reply to Jonathan Druart from comment #11)
> > Hi Aleisha,
> > The getter and setter subroutines (GetIssue, SetIssueNote, SendIssueNote,
> > GetPatronNote) should not be added to C4 but use Koha::Issue[s] instead. Let
> > me know if you need help to do so.
> > And you won't have to provide new tests ;)
> > Ideally the svc script should not be added, but you should use the REST API
> > instead. However the routes for checkins do not exist yet.
> 
> Hi Jonathan,
> 
> My latest patch moves those subroutines into Koha::Issue. Are you sure we
> don't need tests?

By using Koha::Issue I meant using it as an object (so no need to add you
subroutine to the module).
For instance:
  $issue = Koha::Issue::GetIssue({issue_id => $issue_id});
could be
  $issue = Koha::Issues->find( $issue_id);
and $issue becomes a Koha::Object-based object, not an hashref

  SetIssueNote($issue_id, $clean_note)
could be
  Koha::Issues->find( $issue_id )->set({ notedate => dt_from_string, note =
$clean_note })->store;


etc.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list