Created attachment 4931 [details] screenshot When creating a new organisation the section 'patron identity' is changed and you are only offered surname for the name of the organisation. After saving the detail screen shows all fields, even those you are not able to add: - date of birth - initials - gender Ideally those fields should not be displayed for organisational patrons.
Created attachment 4932 [details] screenshot of details page
Created attachment 4950 [details] [review] Proposed fix The output of moremember.pl is supposed to change if the patron in question is an organization (has a category which is of type "I"). The script was checking borrowers.categorycode when it should have been checking categories.category_type. With this correction the right variable is passed to the template. The template needed additional corrections to be sure the correct fields were appearing. The patron entry form offers only phonepro and emailpro, so moremember.pl should output those fields in particular. This patch hides other fields as suggested by the Bug report.
The renaming of the phone fields causes this patch to conflict. Can you please resubmit Owen?
Created attachment 5021 [details] [review] Revised fix
Sorry Owen - I missed testing this earlier. Patch will doesn't apply using 'git bz apply' and gives me a conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt with 'git am -is3'. Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y Applying: Fix for Bug 6698, Detail page for organisations should show only valid fields Using index info to reconstruct a base tree... <stdin>:105: trailing whitespace. $template->param( $data->{'category_type'} => 1 ); warning: 1 line adds whitespace errors. Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt Auto-merging members/moremember.pl Failed to merge in the changes. Patch failed at 0001 Fix for Bug 6698, Detail page for organisations should show only valid fields
Tried to rebase, but has conflicts I wasn't sure how to fix, back to you Owen
Created attachment 10122 [details] [review] Fix for Bug 6698, Detail page for organisations should show only valid fields The output of moremember.pl is supposed to change if the patron in question is an organization (has a category which is of type "I"). The script was checking borrowers.categorycode when it should have been checking categories.category_type. With this correction the right variable is passed to the template. The template needed additional corrections to be sure the correct fields were appearing. The patron entry form offers only phonepro and emailpro, so moremember.pl should output those fields in particular. This patch hides other fields as suggested by the Bug report.
Is this rebasing correct?
Hi Owen, the rebased patch form MJ applied, but I am wondering about the memberentry screen. In the past it was possible to add as many email addresses and phone numbers to an organisational patron as to a normal patron. After the patch, the number is reduced to one email and one phone number. I am not sure, we can make this change without disconnecting libraries from their entered data. Maybe keep all fields in the screen, but make display on the summary dependent on existance?
Created attachment 10330 [details] screenshot of new member entry screen
Is this still valid?
This looks like it has since been fixed.