[Koha-bugs] [Bug 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #24 from Fridolin SOMERS  ---
Pushed to 17.05.x for v17.05.10

Realy strange that this script does not have the .pl extension :/

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-03-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Nick Clemens  changed:

   What|Removed |Added

 Status|Pushed to Master|Pushed to Stable

--- Comment #23 from Nick Clemens  ---
Awsome work all! Pushed to stable for 17.11.04

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-03-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #22 from Marcel de Rooy  ---
(In reply to Fridolin SOMERS from comment #21)
> Can we push to stable branches even if they do not contain Bug 19451 ?

Probably. Careful rebase?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-03-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Fridolin SOMERS  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #21 from Fridolin SOMERS  ---
Can we push to stable branches even if they do not contain Bug 19451 ?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #19 from Marcel de Rooy  ---
Created attachment 72000
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72000=edit
Bug 19452: [17.11.x] Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 
Signed-off-by: Charles Farmer 

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #20 from Marcel de Rooy  ---
Created attachment 72001
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72001=edit
Bug 19452: [17.05.x] Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 
Signed-off-by: Charles Farmer 

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #18 from Marcel de Rooy  ---
(In reply to Katrin Fischer from comment #15)
> more indicating that a patch for
> stable vresions might be nice :)

Will submit one

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #17 from Jonathan Druart  
---
Pushed to master for 18.05, thanks to everybody involved!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Nick Clemens  changed:

   What|Removed |Added

  Attachment #71652|0   |1
is obsolete||

--- Comment #16 from Nick Clemens  ---
Created attachment 71815
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71815=edit
Bug 19452: Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 
Signed-off-by: Charles Farmer 

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Nick Clemens  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Nick Clemens  changed:

   What|Removed |Added

 CC||n...@bywatersolutions.com
 QA Contact|testo...@bugs.koha-communit |n...@bywatersolutions.com
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #15 from Katrin Fischer  ---
Not working on it and not saying so - more indicating that a patch for stable
vresions might be nice :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #14 from Marcel de Rooy  ---
(In reply to Katrin Fischer from comment #13)
> Destroys data unexpectedly... changing this to be a bug. 
> Dependency won't get pushed to stable releases as enh tho.

Are you working on it now? This comment might suggest so..

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de
   Severity|enhancement |normal

--- Comment #13 from Katrin Fischer  ---
Destroys data unexpectedly... changing this to be a bug. 
Dependency won't get pushed to stable releases as enh tho.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452
Bug 19452 depends on bug 19451, which changed state.

Bug 19451 Summary: Let borrowers-force-messaging-defaults.pl optionally add 
preferences only when not already present
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19451

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #69203|0   |1
is obsolete||

--- Comment #11 from Marcel de Rooy  ---
Created attachment 71652
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71652=edit
Bug 19452: Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 
Signed-off-by: Charles Farmer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #12 from Marcel de Rooy  ---
Simple rebase

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2018-02-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Jonathan Druart  changed:

   What|Removed |Added

 CC||frede...@tamil.fr,
   ||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #10 from Jonathan Druart  
---
Frédéric, as you are the author of this script can you confirm this change?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Charles Farmer  changed:

   What|Removed |Added

  Attachment #68201|0   |1
is obsolete||

--- Comment #9 from Charles Farmer  ---
Created attachment 69203
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69203=edit
Bug 19452: Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 
Signed-off-by: Charles Farmer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Charles Farmer  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #8 from Charles Farmer  ---
You're completely right, I thought I was looking at a "Pushed to master"
dependency.

I could easily follow the test plan, and saw no issue after qa1.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-11-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #7 from Marcel de Rooy  ---
(In reply to Charles Farmer from comment #6)
> Can't really say where the problem lies, but I couldn't apply your patches:
> > fatal: sha1 information is lacking or useless 
> > (misc/maintenance/borrowers-force-messaging-defaults.pl).

Thx for trying.
You need the dependency. First git apply 19451.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Charles Farmer  changed:

   What|Removed |Added

 CC||charles.far...@inlibro.com

--- Comment #6 from Charles Farmer  ---
Can't really say where the problem lies, but I couldn't apply your patches:
> fatal: sha1 information is lacking or useless 
> (misc/maintenance/borrowers-force-messaging-defaults.pl).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #5 from Marcel de Rooy  ---
Rebased

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #68175|0   |1
is obsolete||

--- Comment #4 from Marcel de Rooy  ---
Created attachment 68201
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68201=edit
Bug 19452: Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #3 from Marcel de Rooy  ---
Created attachment 68175
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68175=edit
Bug 19452: Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

  Attachment #67998|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

 Status|BLOCKED |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Needs Signoff   |BLOCKED

--- Comment #2 from Marcel de Rooy  ---
Wondering if having this reset option actually makes sense. Or can we just
remove it ?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

--- Comment #1 from Marcel de Rooy  ---
Created attachment 67998
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67998=edit
Bug 19452: Replace the truncate option by reset_all

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences.

This patch replaces -truncate by -reset_all:
It will only delete records from borrower_message_preferences directly,
and skip patron categories. This allows you to reset all borrower prefs
to the untouched prefs from the patron category.
In a follow-up report I will propose to add a category parameter in order
to allow resetting prefs for specific categories.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit -reset_all
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

   Patch complexity|--- |Small patch
 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=18197

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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 19452] The -truncate option in borrowers-force-messaging-defaults.pl should not remove category preferences

2017-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19452

Marcel de Rooy  changed:

   What|Removed |Added

Summary|Fix -truncate option in |The -truncate option in
   |borrowers-force-messaging-d |borrowers-force-messaging-d
   |efaults.pl (replacing it by |efaults.pl should not
   |-reset_all) |remove category preferences

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