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

--- Comment #38 from Jiri Kozlovsky <[email protected]> ---
(In reply to Tomás Cohen Arazi from comment #36)
> Lari, I don't think we should have such a 'validate' method. We should look
> at Jonathan's code to move C4::Members methods into Koha::Patron(s) and have
> them raise those exceptions, and build the endpoint on top of those.
> Please contact him if you are willing to help him and make this happen.

I think, that moving all of the C4::Members methods into Koha::Patron is an
overkill for this bug. There should be created bug for methods migration from
C4 to Koha Objects generally.

If we focus on the goal of this bug - which is adding REST API routes for
adding, updating and deleting patrons, we will find only these methods from
C4::Members to be dependent, thus migrated:
ModMember
changepassword

AddMember
AddMember_Opac

Note that "changepassword" has already been migrated as a part of bug 17006.

My opinion is also that there shouldn't be general "validate" method, because
the validation process depends on what you want to validate.

For example, you are checking for borrowernumber being non-existent in the DB,
but it's contra productive if you want to validate input while updating patron.
Because this is the case you want to check it's existent. These tiny
differences are making it more difficult to maintain single version of
validation.

Btw I think having stashed user being owner would be very nice like Lari
suggested. Perhaps we should file a new bug.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to