It's great to see you starting to use DBIx::Class! What you've written looks pretty great, but I don't really understand the purpose of Koha/DataObject/Discharge.pm. It seems to be basically a wrapper that provides no enhanced business logic and just increases overhead. In fact, in the borrower method, you use GetMember, when you could instead take advantage of DBIC and use $discharge->borrower() instead. I'd also recommend using 'borrowernumber' as the primary key, rather then borrower ( just to keep things standard and unambiguous. ) Other than that, great work! Kyle http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com ) On Wed, Jan 8, 2014 at 1:11 PM, Jonathan Druart < jonathan.druart@biblibre.com> wrote:
Hi developers !
I just finished to rewrite the discharge management system (bug 8007). It is my first try using DBIx Class into Koha and I really hope to have feedback on what I did. Please have a look to the unit tests file too, I found a big problem I did not manage to fix (/FIXME). So I cannot provide unit tests for all routines/methods and it was really boring to test :-/ I hope we could find a way to fix this issue.
It is more a poc than a clean patch series, I am completely open-minded on all changes in the code and the architecture. It is certainly not perfect and I am waiting for criticism.
Regards, Jonathan
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/