It is not possible to modify patrons that don't have one of the following category type: A, I, S, X. E.g. create a patron with category code that has category type Child and notice when you try to modify it gives an error, in the logs you can see: > Patron modification failed! - No property relationship for Koha::Patron at /usr/share/koha/intranet/cgi-bin/members/memberentry.pl Workaround: Set borrowerRelationship syspref empty so the guarantor feature gets disabled. This started happening after bug 26995 was merged because the relationship column was dropped and we have no filtering in place to not try to update that non-existent column.
Created attachment 121538 [details] [review] Bug 28490: Remove "relationship" from the patron form This is managed by the "guarantor" section (table borrower_relationships in DB). It shouldn't be a separate section in the form. We removed the DB column on bug 28490. It caused an exception when the patron's data was stored. Patron modification failed! - No property relationship for Koha::Patron at /usr/share/koha/intranet/cgi-bin/members/memberentry.pl Test plan: Edit a patron with category "Child" and save
Hmm, why was the column removed in bug 28490 if it is actually used as part of the non-patron guarantor infos?
I meant bug 26995
Bug 28490 should have not been merged, it removed actively used data that is only in borrowers.relationship, the non-patron guarantor info relationship. We need to revert it and make database update re-create the table.
Created attachment 121545 [details] [review] Bug 28490: Revert "Bug 26995: Remove one remaining occurrence in moremember" This reverts commit c3b50e9e97e917090ce09283807168caaad3de4a. It was part of a patch set that removed actively used data and must be therefore reverted.
Created attachment 121546 [details] [review] Bug 28490: Revert "Bug 26995: Remove occurrences in sample_patrons.yml" This reverts commit 690b073478b04c7c801058b49f85275281c502d5. It was part of a patch set that removed actively used data and must be therefore reverted.
Created attachment 121547 [details] [review] Bug 28490: Revert "Bug 26995: Fix SQL syntax error on the about page" This reverts commit 1131bb687f14fef7b4cb5f3b194711e85f9227af. It was part of a patch set that removed actively used data and must be therefore reverted.
Created attachment 121548 [details] [review] Bug 28490: Revert "Bug 26995: Remove references to relationship column" This reverts commit 1cc8a77c287666ed878ea58f17216793f52ce224. It was part of a patch set that removed actively used data and must be therefore reverted.
Created attachment 121549 [details] [review] Bug 28490: Revert "Bug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_modifications tables" This reverts commit ca0e7541ecdff13ada9ba8ffbd992c963959d30f. It was part of a patch set that removed actively used data and must be therefore reverted.
Created attachment 121550 [details] [review] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added.
Created attachment 121551 [details] [review] Bug 28490: Bring back accidentally deleted relationship columns These were in active use before and were accidentally deleted in Bug 26995. This restores those deleted relationship columns. To test: 1) verify the borrower_modifications, borrowers, deletedborrowers contain the column exactly like it was before after applying these patches by comparing to the old kohastructure.sql version
Created attachment 121552 [details] [review] [DO NOT PUSH] Bug 28490: Add DBIx schema changes for testing
(In reply to Joonas Kylmälä from comment #4) > Bug 28490 should have not been merged, it removed actively used data that is > only in borrowers.relationship, the non-patron guarantor info relationship. > We need to revert it and make database update re-create the table. I don't think that bug is really the culprit. This is actually a culmination of changes starting with the multiple guarantors development. The decision was made to leave the alternate contact as a 'non-koha patron' guarantor, but no provision was made to be able to apply a relationship to that field! I think the solution is not to revert bug 26995, but to develop an Alternate Contact relationship field ( e.g. 'altcontactrelationship' ) that uses the same set of relationship options available for patron-based guarantors.
(In reply to Kyle M Hall from comment #13) > (In reply to Joonas Kylmälä from comment #4) > > Bug 28490 should have not been merged, it removed actively used data that is > > only in borrowers.relationship, the non-patron guarantor info relationship. > > We need to revert it and make database update re-create the table. > > I don't think that bug is really the culprit. This is actually a culmination > of changes starting with the multiple guarantors development. The decision > was made to leave the alternate contact as a 'non-koha patron' guarantor, > but no provision was made to be able to apply a relationship to that field! What decision? However regardless of any decision we absolutely cannot just remove completely a database column from koha which has been available in the GUI for many releases to fill in with data, there could be for sure people using that relationship column. Also what you say below about altcontactrelationships I think it is best we restore the columns with the same name "relationship" so that in case people have already upgraded to koha 21.05 and lost their data due to this error they are able to restore it from database dump easily after we fix this issue. Changing the column name now would make that process a lot more difficult.
(In reply to Joonas Kylmälä from comment #14) > (In reply to Kyle M Hall from comment #13) > > (In reply to Joonas Kylmälä from comment #4) > > > Bug 28490 should have not been merged, it removed actively used data that is > > > only in borrowers.relationship, the non-patron guarantor info relationship. > > > We need to revert it and make database update re-create the table. > > > > I don't think that bug is really the culprit. This is actually a culmination > > of changes starting with the multiple guarantors development. The decision > > was made to leave the alternate contact as a 'non-koha patron' guarantor, > > but no provision was made to be able to apply a relationship to that field! > > What decision? [...] ah, getting tired. I guess you meant the patches from 14570 where the new guarantor feature was introduced.
I need to take back a good portion of what I wrote, as I was completely wrong. I should have double checked my memory. Joonas is correct and we should revert bug 26995. It *was* revealed in the ui for non-patron guarantors. I was just looking in the wrong place!
Created attachment 121595 [details] [review] Bug 28490: Revert "Bug 26995: Remove one remaining occurrence in moremember" This reverts commit c3b50e9e97e917090ce09283807168caaad3de4a. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121596 [details] [review] Bug 28490: Revert "Bug 26995: Remove occurrences in sample_patrons.yml" This reverts commit 690b073478b04c7c801058b49f85275281c502d5. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121597 [details] [review] Bug 28490: Revert "Bug 26995: Fix SQL syntax error on the about page" This reverts commit 1131bb687f14fef7b4cb5f3b194711e85f9227af. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121598 [details] [review] Bug 28490: Revert "Bug 26995: Remove references to relationship column" This reverts commit 1cc8a77c287666ed878ea58f17216793f52ce224. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121599 [details] [review] Bug 28490: Revert "Bug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_modifications tables" This reverts commit ca0e7541ecdff13ada9ba8ffbd992c963959d30f. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121600 [details] [review] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121601 [details] [review] Bug 28490: Bring back accidentally deleted relationship columns These were in active use before and were accidentally deleted in Bug 26995. This restores those deleted relationship columns. To test: 1) verify the borrower_modifications, borrowers, deletedborrowers contain the column exactly like it was before after applying these patches by comparing to the old kohastructure.sql version Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121602 [details] [review] Bug 28490: Add DBIx schema changes for testing Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 121655 [details] [review] Bug 28490: Bring back accidentally deleted relationship columns These were in active use before and were accidentally deleted in Bug 26995. This restores those deleted relationship columns. To test: 1) verify the borrower_modifications, borrowers, deletedborrowers contain the column exactly like it was before after applying these patches by comparing to the old kohastructure.sql version
Created attachment 121656 [details] [review] [DO NOT PUSH] Bug 28490: Add DBIx schema changes for testing
The atomicupdate incorrectly appended the relationship column to end of the tables instead of after borrowernotes column like it was originally. Fixed that now. Ready for sign-off.
Created attachment 121661 [details] [review] Bug 28490: Revert "Bug 26995: Remove one remaining occurrence in moremember" This reverts commit c3b50e9e97e917090ce09283807168caaad3de4a. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121662 [details] [review] Bug 28490: Revert "Bug 26995: Remove occurrences in sample_patrons.yml" This reverts commit 690b073478b04c7c801058b49f85275281c502d5. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121663 [details] [review] Bug 28490: Revert "Bug 26995: Fix SQL syntax error on the about page" This reverts commit 1131bb687f14fef7b4cb5f3b194711e85f9227af. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121664 [details] [review] Bug 28490: Revert "Bug 26995: Remove references to relationship column" This reverts commit 1cc8a77c287666ed878ea58f17216793f52ce224. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121665 [details] [review] Bug 28490: Revert "Bug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_modifications tables" This reverts commit ca0e7541ecdff13ada9ba8ffbd992c963959d30f. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121666 [details] [review] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121667 [details] [review] Bug 28490: Bring back accidentally deleted relationship columns These were in active use before and were accidentally deleted in Bug 26995. This restores those deleted relationship columns. To test: 1) verify the borrower_modifications, borrowers, deletedborrowers contain the column exactly like it was before after applying these patches by comparing to the old kohastructure.sql version Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121669 [details] [review] Bug 28490: Add DBIx schema changes for testing Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 121811 [details] [review] Bug 28490: Revert "Bug 26995: Remove one remaining occurrence in moremember" This reverts commit c3b50e9e97e917090ce09283807168caaad3de4a. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index cd416da0ec..eaa0d18841 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -321,7 +321,7 @@ [% END %] [% END %] [% IF patron.contactfirstname OR patron.contactname %] - <li>[% patron.contactfirstname | html %] [% patron.contactname | html %]</li> + <li>[% patron.contactfirstname | html %] [% patron.contactname | html %][% IF patron.relationship %] ([% patron.relationship | html %])[% END %]</li> [% END %] </ul> </li> -- 2.25.1
Created attachment 121812 [details] [review] Bug 28490: Revert "Bug 26995: Remove occurrences in sample_patrons.yml" This reverts commit 690b073478b04c7c801058b49f85275281c502d5. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121813 [details] [review] Bug 28490: Revert "Bug 26995: Fix SQL syntax error on the about page" This reverts commit 1131bb687f14fef7b4cb5f3b194711e85f9227af. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121814 [details] [review] Bug 28490: Revert "Bug 26995: Remove references to relationship column" This reverts commit 1cc8a77c287666ed878ea58f17216793f52ce224. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121815 [details] [review] Bug 28490: Revert "Bug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_modifications tables" This reverts commit ca0e7541ecdff13ada9ba8ffbd992c963959d30f. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121816 [details] [review] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121817 [details] [review] Bug 28490: Bring back accidentally deleted relationship columns These were in active use before and were accidentally deleted in Bug 26995. This restores those deleted relationship columns. To test: 1) verify the borrower_modifications, borrowers, deletedborrowers contain the column exactly like it was before after applying these patches by comparing to the old kohastructure.sql version Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121818 [details] [review] Bug 28490: Add DBIx schema changes for testing Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 121823 [details] [review] Bug 28490: Revert "Bug 26995: Remove one remaining occurrence in moremember" This reverts commit c3b50e9e97e917090ce09283807168caaad3de4a. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121824 [details] [review] Bug 28490: Revert "Bug 26995: Remove occurrences in sample_patrons.yml" This reverts commit 690b073478b04c7c801058b49f85275281c502d5. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121825 [details] [review] Bug 28490: Revert "Bug 26995: Fix SQL syntax error on the about page" This reverts commit 1131bb687f14fef7b4cb5f3b194711e85f9227af. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121826 [details] [review] Bug 28490: Revert "Bug 26995: Remove references to relationship column" This reverts commit 1cc8a77c287666ed878ea58f17216793f52ce224. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121827 [details] [review] Bug 28490: Revert "Bug 26995: Drop column relationship from borrowers, deletedborrowers and borrower_modifications tables" This reverts commit ca0e7541ecdff13ada9ba8ffbd992c963959d30f. It was part of a patch set that removed actively used data and must be therefore reverted. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121828 [details] [review] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121829 [details] [review] Bug 28490: Bring back accidentally deleted relationship columns These were in active use before and were accidentally deleted in Bug 26995. This restores those deleted relationship columns. To test: 1) verify the borrower_modifications, borrowers, deletedborrowers contain the column exactly like it was before after applying these patches by comparing to the old kohastructure.sql version Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 121830 [details] [review] Bug 28490: Add DBIx schema changes for testing Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
I can edit patrons, the about page works, all looks correct. I did get some errors from qa tools about DBIC *************************************************************************** DBIx::Class::Relationship::ManyToMany::many_to_many(): *************************************************************************** The many-to-many relationship 'ordernumbers' is trying to create a utility method called ordernumbers_rs. This will completely overwrite one such already existing method on class Koha::Schema::Result::Borrower. You almost certainly want to rename your method or the many-to-many relationship, as the functionality of the original method will not be accessible anymore. To disable this warning set to a true value the environment variable DBIC_OVERWRITE_HELPER_METHODS_OK *************************************************************************** I assume this is a clash of 'relationship' columns and Relationship class? things still seem to work, but noting
Created attachment 121915 [details] [review] Bug 28490: Comment out the relationship data removing DB update step These columns that were actively used to store non-patron guarantor relationship info were dropped incorrectly. In a later patch the relationship fields will be re-added. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> JD Amended patch: Add a "SKIP" note on the DBrev we commented out
(In reply to Nick Clemens from comment #52) > I can edit patrons, the about page works, all looks correct. I did get some > errors from qa tools about DBIC > > *************************************************************************** > DBIx::Class::Relationship::ManyToMany::many_to_many(): > *************************************************************************** > The many-to-many relationship 'ordernumbers' is trying to create a utility > method > called ordernumbers_rs. > This will completely overwrite one such already existing method on class > Koha::Schema::Result::Borrower. > > You almost certainly want to rename your method or the many-to-many > relationship, as the functionality of the original method will not be > accessible anymore. > > To disable this warning set to a true value the environment variable > DBIC_OVERWRITE_HELPER_METHODS_OK > > *************************************************************************** > > I assume this is a clash of 'relationship' columns and Relationship class? > things still seem to work, but noting I've logged that on bug 28564.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 20.05.x for 20.05.01
Depends on Bug 26995 not in 20.11.x