[Koha-bugs] [Bug 18125] Edit button can duplicate some circulation rule

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 28 09:43:15 CET 2017


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

--- Comment #4 from Baptiste <baptiste.wojtkowski at biblibre.com> ---
Hi !

I don't think there is a quite better solution without changing everything in
the code, but if you have any better idea I can try it ;)

I mean, this situation is better than the old one, because there is no
unexpected behaviour of the application, in the old one, you can click on edit,
save, see the new rule as expected, not notice there is a new one and work with
a new circulation rule.

The application works so :
- when you click on edit, every fields of the current row get copied into the
last row.
- when you submit the edited lines (which has no other status than the other
lines), it checks if there is a row in the base with the same key (library +
patron category + Item type). Case not it creates a new one, otherwise it
modifies the old one : this means if you accidentally create a new rule, you
will destroy the existing one.

I think to solve completely the problem, the interface should be transformed at
all, because with this working, we can't :
- write a function which copies without editing if the keys are the same
- write a function which edits without creating a new one if the keys are
differents.

Moreover the comments in the code were expecting this behaviour, but I think
somewhere in the versions the behaviour got lost.

I don't think an alert would be a good idea because :
- if you put it on submit button, you will get it whenever you create a new
rule
- if you put it on the edit button, you will get it whenever you edit a rule
and  it is quite annoying

A half solution could be to alert if any line is about to get replaced, but it
is the same problem : the user will be alerted only if the button does his job.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list