Bug 6698 - Detail page for organisations should show only valid fields
Summary: Detail page for organisations should show only valid fields
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P3 trivial (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL: /cgi-bin/koha/members/moremember.pl?b...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 12:12 UTC by Katrin Fischer
Modified: 2023-06-08 22:26 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
screenshot (5.57 KB, image/png)
2011-08-10 12:12 UTC, Katrin Fischer
Details
screenshot of details page (12.09 KB, image/png)
2011-08-10 12:13 UTC, Katrin Fischer
Details
Proposed fix (6.27 KB, patch)
2011-08-10 19:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Revised fix (5.81 KB, patch)
2011-08-15 18:27 UTC, Owen Leonard
Details | Diff | Splinter Review
Fix for Bug 6698, Detail page for organisations should show only valid fields (5.58 KB, patch)
2012-06-10 14:51 UTC, MJ Ray (software.coop)
Details | Diff | Splinter Review
screenshot of new member entry screen (22.69 KB, image/png)
2012-06-17 13:45 UTC, Katrin Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2011-08-10 12:12:24 UTC
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.
Comment 1 Katrin Fischer 2011-08-10 12:13:35 UTC
Created attachment 4932 [details]
screenshot of details page
Comment 2 Owen Leonard 2011-08-10 19:05:05 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2011-08-14 14:16:48 UTC
The renaming of the phone fields causes this patch to conflict. 
Can you please resubmit Owen?
Comment 4 Owen Leonard 2011-08-15 18:27:28 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2011-10-18 05:43:12 UTC
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
Comment 6 Chris Cormack 2012-04-01 07:44:45 UTC
Tried to rebase, but has conflicts I wasn't sure how to fix, back to you Owen
Comment 7 MJ Ray (software.coop) 2012-06-10 14:51:27 UTC
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.
Comment 8 MJ Ray (software.coop) 2012-06-10 14:52:21 UTC
Is this rebasing correct?
Comment 9 Katrin Fischer 2012-06-17 13:45:15 UTC
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?
Comment 10 Katrin Fischer 2012-06-17 13:45:39 UTC
Created attachment 10330 [details]
screenshot of new member entry screen
Comment 11 Jonathan Druart 2015-02-20 16:14:06 UTC
Is this still valid?
Comment 12 Owen Leonard 2022-08-19 14:19:19 UTC
This looks like it has since been fixed.