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

Emmi Takkinen <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #158525|0                           |1
        is obsolete|                            |

--- Comment #26 from Emmi Takkinen <[email protected]> ---
Created attachment 184068
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184068&action=edit
Bug 34671: Ignore new_guarantor_relationship and patron attribute inputs if
they are hidden

Validating patron forms hidden fields causes problems when
adding/modifying guarantee patrons since class
new_guarantor_relationship is always hidden and mandatory
if syspref "borrowerRelationship" is set. Also patron attributes
not used by patron category are still present in form as hidden
and marked as required if they are set as mandatory. This patch
removes and adds attribute required to these fields based on their
visibility.

To test guarantor relationship:
1. Apply previous patch.
2. Add or modify guarantee patron.
3. Do not add or modify guarantor.
4. Attempt to save patron.
=> Pressing save button does nothing and no error is
displayed.
5. Apply this patch.
6. Again add or modify guarantee patron and don't add or
modify guarantor.
7. Attempt to save.
=> Saving should now be successfull.
8. Again, add or modify guarantee patron, but this time also
add or modify guarantor.
9. Leave relationship input empty.
10. Attempt to save.
=> Saving should fail and error "There are some required
fields missing..." should be displayed on top of "Patron
guarantor" field set.
11. Add relationship for guarantor and save.
=> Saving should now be successfull.

To test  patron attributes:
1. Add patron attribute for patron category A and set it as mandatory.
2. Add patron with category B and fill in required fields.
3. Attempt to save.
=> Error is displayed above "Additional attributes and identifiers"
field set.
4. Apply this patch.
5. Repeat steps 2 and 3.
=> Save successfully.
6. Add new patron with category B, but this time change patrons
category as A from patron form.
=> Confirm that mandatory patron attribute is displayed correctly
and without it patron cannot be saved.

Sponsored-by: Koha-Suomi Oy

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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