[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 Attachment #105677|0   |1
is obsolete||

--- Comment #31 from Peter Vashchuk  ---
Created attachment 105972
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105972=edit
Bug 25322: fix for not selected "relationship" defaults to father

When a user creates a patron's guarantor on
/cgi-bin/koha/members/memberentry.pl but doesn't select the relationship from a
dropdown, the relationship defaults to first value, which in default sysprefs
is "father". This may or may not be correct as this is not a conscious choice
from the user.

The solution is to make the "Relationship" field mandatory when there is no
empty entry in the system preferences, always starting with an empty option but
not allowing the user to save an empty entry.
And if there is an empty option in sysprefs, it allows to save empty, as well
as makes it default choice.

To reproduce with default system preferences:
1) Create a new patron who is assumed to have a guarantor or modify the
existing one.
2) Under "Guarantor Information" click on "Search to add" button. After
performing the search, select a user to act as guarantor. Don't use the
dropdown menu to select a relationship. Save your changes.
3) Observe that relationship is set as "father".
4) Apply the patch.
5) Repeat steps 1 and 2.
6) Observe that it doesn't allow you to save the form until you pick a
relationship type.

To reproduce with empty entry added to system preferences:
1) Add an empty entry to borrowerRelationship at
/cgi-bin/koha/admin/preferences.pl?tab=patrons in Patron relationships section
(example: "|father|mother").
2) Create a new patron who is assumed to have a guarantor or modify the
existing one.
3) Under "Guarantor Information" click on "Search to add" button. After
performing the search, select a user to act as guarantor. Don't use the
dropdown menu to select a relationship. Save your changes.
4) Observe that relationship is set as "father".
5) Apply the patch.
6) Repeat steps 1, 2 and 3.
7) Observe when you save the empty entry it does set the relationship as
empty.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Jonathan Druart  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #30 from Jonathan Druart  
---
There is a conflict:
CONFLICT (content): Merge conflict in
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

Also, this is invalid:
Relationship: 

It breaks our translation tool, you should not add TT tag inside an HTML tag.
You should write instead:
[% UNLESS empty_relationship_allowed %]
Relationship: 
[% ELSE %]
Relationship: 
[% END %]

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 Attachment #105420|0   |1
is obsolete||

--- Comment #29 from Peter Vashchuk  ---
Created attachment 105677
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105677=edit
Bug 25322: fix for not selected "relationship" defaults to father

When a user creates a patron's guarantor on
/cgi-bin/koha/members/memberentry.pl but doesn't select the relationship from a
dropdown, the relationship defaults to first value, which in default sysprefs
is "father". This may or may not be correct as this is not a conscious choice
from the user.

The solution is to make the "Relationship" field mandatory when there is no
empty entry in the system preferences, always starting with an empty option but
not allowing the user to save an empty entry.
And if there is an empty option in sysprefs, it allows to save empty, as well
as makes it default choice.

To reproduce with default system preferences:
1) Create a new patron who is assumed to have a guarantor or modify the
existing one.
2) Under "Guarantor Information" click on "Search to add" button. After
performing the search, select a user to act as guarantor. Don't use the
dropdown menu to select a relationship. Save your changes.
3) Observe that relationship is set as "father".
4) Apply the patch.
5) Repeat steps 1 and 2.
6) Observe that it doesn't allow you to save the form until you pick a
relationship type.

To reproduce with empty entry added to system preferences:
1) Add an empty entry to borrowerRelationship at
/cgi-bin/koha/admin/preferences.pl?tab=patrons in Patron relationships section
(example: "|father|mother").
2) Create a new patron who is assumed to have a guarantor or modify the
existing one.
3) Under "Guarantor Information" click on "Search to add" button. After
performing the search, select a user to act as guarantor. Don't use the
dropdown menu to select a relationship. Save your changes.
4) Observe that relationship is set as "father".
5) Apply the patch.
6) Repeat steps 1, 2 and 3.
7) Observe when you save the empty entry it does set the relationship as
empty.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #28 from Katrin Fischer  ---
Ok, I understand the problem with this patch now.

borrowerRelationship: |father|mother

With the patch:
When you add an empty entry to the system preference, you end up with 2 empty
entries in the list. None of them can be saved.

Without the patch:
The | has no effect - it shows an empty entry with |father|mother and with
father|mother. You can save the empty entry, but it will result in father.

I am leaning towards comment#25 now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #27 from Katrin Fischer  ---
Hi, I'll try to test, but just to make sure there is no misunderstanding: the
issue is not the missing empty option and that it could be configured. The
issue is, that you can select empty and save, but it won't save as empty, but
select the first of your values (most of the time father, if you haven't
changed defaults) That's the unexpected behaviour.

1) Create a new user or modify an existing one.
2) Under Guarantor Information, click on "Search to add" button
3) Perform your search, and select user to act as a guarantor
4) Do not use the dropdown menu to select a relationship.
5) Save the record
6) It will show the relationship as 'father'

Comment#25 would work for me, but I am still not sure it should block this
patch, which is a bug fix. We will also need a clear explanation on the system
preference.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #26 from Andrew Fuerste-Henry  ---
(In reply to Jonathan Druart from comment #25)
> Can we agree on this?
> 
> * If the pref does not contain an empty entry then we add a preselected
> empty value in the dropdown list and make it mandatory
> 
> * If the pref contain an empty entry ("|father|mother"), then we make it
> optional.

Works for me!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #25 from Jonathan Druart  
---
Can we agree on this?

* If the pref does not contain an empty entry then we add a preselected empty
value in the dropdown list and make it mandatory

* If the pref contain an empty entry ("|father|mother"), then we make it
optional.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #24 from Alex Arnaud  ---
(In reply to Alex Arnaud from comment #23)
> I would agree with a patch allowing empty value with the same in the syspref

Without** the same in the syspref

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #23 from Alex Arnaud  ---
However, it may not be very clear for users to set the syspref with an empty
value. 

I would agree with a patch allowing empty value with the same in the syspref

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #22 from Alex Arnaud  ---
Agree with Andrew and Jonathan.

"|father|mother" in borrowerRelationship syspref allows to save unspecified
relationship.

As the main issue described here is "If no relationship is specified, then it
ought not to be populate", i have to say that i don't find any bug.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #21 from Jonathan Druart  
---
QA, please test with "|father|mother" in the syspref.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-06-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Alex Arnaud  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |alex.arn...@biblibre.com
   |y.org   |
 CC||alex.arn...@biblibre.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #20 from David Roberts  ---
(In reply to Jonathan Druart from comment #18)
> Did not we want to allow "no relationship"?

I can't really think of a use case for this. Anybody acting as guarantor must
have some sort of relationship with the guarantee, even if it is a non-familial
relationship. Couldn't users in any case create an auth value that covers "no
relationship" as an option?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #19 from Katrin Fischer  ---
(In reply to Jonathan Druart from comment #18)
> Did not we want to allow "no relationship"?

It's not possible now, maybe we should discuss this as a future feature
separately.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Jonathan Druart  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |stalkern...@gmail.com
   |ity.org |

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #18 from Jonathan Druart  
---
Did not we want to allow "no relationship"?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Holly  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
 CC||h...@interleaf.ie

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

ByWater Sandboxes  changed:

   What|Removed |Added

 Attachment #105419|0   |1
is obsolete||

--- Comment #17 from ByWater Sandboxes  ---
Created attachment 105420
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105420=edit
Bug 25322: fix for don't default "relationship" dropdown to father

When you create a patron's guarantor on cgi-bin/koha/members/memberentry.pl but
don't select the relationship from a dropdown, the relationship defaults to
first default value, which in this case is father that may or may not be
correct as that is not a conscious choice from the user.
The solution is to make the "Relationship" field mandatory, starting with an
empty option but not allowing the user to save empty, so choice will be
conscious.

To reproduce:
1) Create a new patron who is assumed to have a guarantor or modify the
existing one.
2) Under "Guarantor Information" click on "Search to add" button. After
performing the search, select a user to act as guarantor. Don't use the
dropdown menu to select a relationship. Save your changes.
3) Observe that relationship is set as "father".
4) Apply the patch.
5) Repeat steps 1 and 2.
6) Observe that it doesn't allow you to save the form until you pick a
relationship type.

Mentored-by: Andrew Nugged 

Signed-off-by: Holly Cooper 

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #16 from Peter Vashchuk  ---
Created attachment 105419
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105419=edit
Bug 25322: fix for don't default "relationship" dropdown to father

When you create a patron's guarantor on cgi-bin/koha/members/memberentry.pl but
don't select the relationship from a dropdown, the relationship defaults to
first default value, which in this case is father that may or may not be
correct as that is not a conscious choice from the user.
The solution is to make the "Relationship" field mandatory, starting with an
empty option but not allowing the user to save empty, so choice will be
conscious.

To reproduce:
1) Create a new patron who is assumed to have a guarantor or modify the
existing one.
2) Under "Guarantor Information" click on "Search to add" button. After
performing the search, select a user to act as guarantor. Don't use the
dropdown menu to select a relationship. Save your changes.
3) Observe that relationship is set as "father".
4) Apply the patch.
5) Repeat steps 1 and 2.
6) Observe that it doesn't allow you to save the form until you pick a
relationship type.

Mentored-by: Andrew Nugged 

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #15 from Katrin Fischer  ---
Do you mean to make the field mandatory with the empty selected not allowing
you to save? Then yes :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #14 from Andrew Nugged  ---
(In reply to Katrin Fischer from comment #13)
> I don't think that's correct beahviour. Because we ship Koha with
> father|mother and we already have an empty value displaying. The problem is
> that when you use the empty value, father gets added to your record (the
> first entry). That's clearly unexpected behaviour (select empty, get
> something else saved).

I support you and support what Peter proposed: 

to append empty , but in code/DB to have
only two options, so validate:

and because of this to force the user to do conscious choice, not allowing
empty value to pass-through. Can it be the solution?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #13 from Katrin Fischer  ---
(In reply to Jonathan Druart from comment #11)
> If you have "|father|mother" in the pref (instead of the default
> "father|mother"), then you can select the empty option, save, and it is kept
> with "".
> This behaviour answers your need.
> 
> The problematic situation is when "empty" is not in the pref list. In that
> case we should select the first entry "father" and force the user to select
> a value.

I don't think that's correct beahviour. Because we ship Koha with father|mother
and we already have an empty value displaying. The problem is that when you use
the empty value, father gets added to your record (the first entry). That's
clearly unexpected behaviour (select empty, get something else saved).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #12 from Katrin Fischer  ---
(In reply to Jonathan Druart from comment #9)
> Why not simply select the first option of the select?

And because it's error prone if you don't make people select something and just
assume something - especially in this case as everyone will turn out as a 'dad'

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #11 from Jonathan Druart  
---
If you have "|father|mother" in the pref (instead of the default
"father|mother"), then you can select the empty option, save, and it is kept
with "".
This behaviour answers your need.

The problematic situation is when "empty" is not in the pref list. In that case
we should select the first entry "father" and force the user to select a value.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #10 from David Roberts  ---
(In reply to Jonathan Druart from comment #9)
> Why not simply select the first option of the select?

Because you don't *have* to select it - if you don't want a relationship and
select it then that's great - it'll do what you want. But if you don't want
want a relationship and don't select it because it already looks like the field
is already empty, it populates it with data incorrectly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #9 from Jonathan Druart  
---
Why not simply select the first option of the select?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #8 from Katrin Fischer  ---
I just tested this in 18.11 to be able to see how it was before the recent
changes. In 18.11 it's also not possible to set the relationship to an empty
value - I guess in this case we should make it mandatory?

Would be great to have Kyle's opinion on this maybe.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 CC||nug...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Peter Vashchuk  changed:

   What|Removed |Added

 CC||stalkern...@gmail.com

--- Comment #7 from Peter Vashchuk  ---
Yes, there is  with 2 defined options: father and mother.
When I added empty  and tried to save the form I got 500 error "Invalid
relationship passed, '' is not defined.", because:

File: /Koha/Patron/Relationship.pm
53: Koha::Exceptions::Patron::Relationship::InvalidRelationship->throw(
54:   no_relationship => 1 )
55:   unless defined $self->relationship;
56:
57: Koha::Exceptions::Patron::Relationship::InvalidRelationship->throw(
58:   relationship => $self->relationship )
59:   unless any { $_ eq $self->relationship } @valid_relationships;

Which means there is no possibility to store empty relationship, as well any
relationship should be in @valid_relationships.

My proposal is to anyway append empty , and then
either:
- if mandatory: perform form validation and force user to choose one of the
defined options,
- if relationship is not mandatory, then the code above (line 53-55) should be
changed to allow storing empty relationship (but I am not sure about business
logic)

I can implement any of these, but I need your expertise to decide which is the
correct one.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-05-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Katrin Fischer  changed:

   What|Removed |Added

   Severity|enhancement |major

--- Comment #6 from Katrin Fischer  ---
That's odd - after testing I see what you mean. There is an empty option in the
pull downs, but if you leave it empty, it still picks the first. Upping
severity a bit as this changes data unexpectedly (not quite data loss... but
similar)

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #5 from David Roberts  ---
(In reply to Katrin Fischer from comment #4)
> If you make it mandatory or leave it - in both situations we will need an
> empty value added to the pull down, so that it's a conscious choice. I think
> we should add an empty value for now and a new bug for making it optionally
> mandatory?

That sounds sensible - I'd be happy with that solution. At the moment, it looks
like there is a blank option, but it doesn't appear to be functional.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #4 from Katrin Fischer  ---
If you make it mandatory or leave it - in both situations we will need an empty
value added to the pull down, so that it's a conscious choice. I think we
should add an empty value for now and a new bug for making it optionally
mandatory?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #3 from Andrew Fuerste-Henry  ---
I'd be hesitant to make any field hardcoded to be required, but can see why one
would want the option. And right now there's no way to make it required as
BorrowerMandatoryField only covers things in the borrowers table and guarantor
relationship has moved into the borrower_relationships table.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-04-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

--- Comment #2 from David Roberts  ---
(In reply to Andrew Fuerste-Henry from comment #1)
> It looks like it doesn't default to "father" specifically. It defaults to
> whatever the first value in the syspref borrowerRelationship is. In the
> default data, that's "father|mother." When I change it to "|father|mother,"
> so the first possible value is nothing, then it saves with no relationship.

That makes sense - I didn't notice that. However, on my system this is exactly
as delivered from the install, so I think that most people will probably find
that father is first. Either way, I think it is still incorrect behaviour.
Perhaps a sensible workaround might be to make the field required, so that you
can't leave it blank? I can't immediately think of a scenario where you
wouldn't want to specify what the relationship is.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 25322] Adding a guarantor with no relationship defaults to father

2020-04-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25322

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 CC||and...@bywatersolutions.com

--- Comment #1 from Andrew Fuerste-Henry  ---
It looks like it doesn't default to "father" specifically. It defaults to
whatever the first value in the syspref borrowerRelationship is. In the default
data, that's "father|mother." When I change it to "|father|mother," so the
first possible value is nothing, then it saves with no relationship.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/