[Koha-bugs] [Bug 25996] Changes to restrictions should be logged

2025-04-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Caroline Cyr La Rose  changed:

   What|Removed |Added

  Documentation||https://gitlab.com/koha-com
 submission||munity/koha-manual/-/merge_
   ||requests/1029
 CC||caroline.cyr-la-rose@inlibr
   ||o.com
 Resolution|--- |FIXED
  Documentation||Caroline Cyr La Rose
contact||
 Status|Needs documenting   |RESOLVED

-- 
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 25996] Changes to restrictions should be logged

2024-07-25 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 CC|martin.renvoize@ptfs-europe |
   |.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 25996] Changes to restrictions should be logged

2024-05-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Katrin Fischer  changed:

   What|Removed |Added

  Text to go in the||This adds logging of
  release notes||adding, updating and
   ||lifting of patron
   ||restrictions. It's
   ||controlled by the
   ||`BorrowersLog` 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 25996] Changes to restrictions should be logged

2024-05-24 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Fridolin Somers  changed:

   What|Removed |Added

 Status|Pushed to main  |Needs documenting
 CC||fridolin.som...@biblibre.co
   ||m

--- Comment #27 from Fridolin Somers  ---
Not backported to 23.11.x

-- 
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 25996] Changes to restrictions should be logged

2024-05-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #26 from Katrin Fischer  ---
Pushed for 24.05!

Well done everyone, thank you!

-- 
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 25996] Changes to restrictions should be logged

2024-05-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Katrin Fischer  changed:

   What|Removed |Added

 Version(s)||24.05.00
released in||
 Status|Passed QA   |Pushed to main

-- 
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 25996] Changes to restrictions should be logged

2024-05-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #25 from Katrin Fischer  ---
Some notes:

1) Love to see how this replaces some SQL in Koha namespace.

2) Log viewer GUI needs some work

As this is not a new module, we create new actions for create, modify and
delete or restrictions, that clutter the log viewer page a little more.
Something to tackle on another day (bug) 

3) Add JSON soon? 

This development overlapped with the just pushed work from Kyle on making the
data storage in action logs a bit more standardized:

Bug 25159 - Action logs should be stored in JSON

This is at the moment not applied to all existing logging, so definitely not a
blocker here.

4) Amended BorrowersLog system preference description to include "patron
restrictions" in a follow-up.

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Katrin Fischer  changed:

   What|Removed |Added

   Severity|normal  |enhancement

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |martin.renvoize@ptfs-europe
   |y.org   |.com
 Status|Signed Off  |Passed QA

--- Comment #24 from Martin Renvoize  ---
Nice improvement, no regressions, QA scripts happy and unit testes present and
correct.

Passing QA

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #165285|0   |1
is obsolete||

--- Comment #23 from Martin Renvoize  ---
Created attachment 166060
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166060&action=edit
Bug 25996: (follow-up) Log the entire object on deletion

Signed-off-by: Michaela Sieber 
Signed-off-by: Martin Renvoize 

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #165284|0   |1
is obsolete||

--- Comment #22 from Martin Renvoize  ---
Created attachment 166059
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166059&action=edit
Bug 25996: Add restrictions to the log viewer

This patch adds the new log actions, related to restrictions, to the log
viewer.

To test:
0. Set BorrowersLog to 'Log'
1. Pick a patron
2. Add a restriction and identify it's id, maybe using the DB:
   $ ktd --shell
  k$ koha-mysql kohadev
   > SELECT * FROM borrower_debarments;
3. Run [1]:
  k$ perl -MKoha::Patron::Debarments \
 -e 'Koha::Patron::Debarments::ModDebarment( { borrower_debarment_id =>
195, comment => "potato" } );'
4. Visit the log viewer.
=> SUCCESS: You can filter on 'Create restriction', 'Modify restriction'
and 'Delete restriction', things are displayed correctly.

[1] There's the ModDebarment method in the codebase, but I couldn't find
a way to trigger it for testing, so my last resort was to do it from the
CLI, manually. The tests on the previous patches cover the method
anyway.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 
Signed-off-by: Martin Renvoize 

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #165283|0   |1
is obsolete||

--- Comment #21 from Martin Renvoize  ---
Created attachment 166058
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166058&action=edit
Bug 25996: Add logging to restrictions actions

This patch adds logging for the following actions:

* CREATE_RESTRICITON
* MODIFY_RESTRICTION
* DELETE_RESTRICTION

To test:
1. Apply the unit tests
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> FAIL: The feature is not implemented! Nothing is logged!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 
Signed-off-by: Martin Renvoize 

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #165282|0   |1
is obsolete||

--- Comment #20 from Martin Renvoize  ---
Created attachment 166057
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166057&action=edit
Bug 25996: Unit tests

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 
Signed-off-by: Martin Renvoize 

-- 
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 25996] Changes to restrictions should be logged

2024-05-02 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #165281|0   |1
is obsolete||

--- Comment #19 from Martin Renvoize  ---
Created attachment 166056
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166056&action=edit
Bug 25996: Make AddDebarment() use Koha::Patron::Restriction

This patch makes the AddDebarment() method use the Koha::Object-based
class to ease the next steps. The current codebase makes the feature
fragile otherwise, as adding a new row and then querying for the latest
row of that kind seems risky,

With this approach the result is the same, but we have the
Koha::Patron::Restriction object for using it later in logging.

I opted to return 1 as it does now. The whole module deserves to be
removed in the future but it is out of the scope of this report.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> SUCCESS: Tests pass
2. Apply this tiny refactoring patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 
Signed-off-by: Martin Renvoize 

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Michaela Sieber  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #18 from Michaela Sieber  ---
(In reply to Tomás Cohen Arazi from comment #12)
> > But these are the most important information for us, we need to know which
> > restriction was deleted.
> > 
> > Would it be possible to log at least the borrower_debarment_id ?
> > Better would be the information about all restriction fields of course ;-)
> 
> Done!

Great, thanks!

Signed off :-)

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

ByWater Sandboxes  changed:

   What|Removed |Added

 Attachment #165267|0   |1
is obsolete||

--- Comment #17 from ByWater Sandboxes  ---
Created attachment 165285
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165285&action=edit
Bug 25996: (follow-up) Log the entire object on deletion

Signed-off-by: Michaela Sieber 

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

ByWater Sandboxes  changed:

   What|Removed |Added

 Attachment #165247|0   |1
is obsolete||

--- Comment #16 from ByWater Sandboxes  ---
Created attachment 165284
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165284&action=edit
Bug 25996: Add restrictions to the log viewer

This patch adds the new log actions, related to restrictions, to the log
viewer.

To test:
0. Set BorrowersLog to 'Log'
1. Pick a patron
2. Add a restriction and identify it's id, maybe using the DB:
   $ ktd --shell
  k$ koha-mysql kohadev
   > SELECT * FROM borrower_debarments;
3. Run [1]:
  k$ perl -MKoha::Patron::Debarments \
 -e 'Koha::Patron::Debarments::ModDebarment( { borrower_debarment_id =>
195, comment => "potato" } );'
4. Visit the log viewer.
=> SUCCESS: You can filter on 'Create restriction', 'Modify restriction'
and 'Delete restriction', things are displayed correctly.

[1] There's the ModDebarment method in the codebase, but I couldn't find
a way to trigger it for testing, so my last resort was to do it from the
CLI, manually. The tests on the previous patches cover the method
anyway.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

ByWater Sandboxes  changed:

   What|Removed |Added

 Attachment #165246|0   |1
is obsolete||

--- Comment #15 from ByWater Sandboxes  ---
Created attachment 165283
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165283&action=edit
Bug 25996: Add logging to restrictions actions

This patch adds logging for the following actions:

* CREATE_RESTRICITON
* MODIFY_RESTRICTION
* DELETE_RESTRICTION

To test:
1. Apply the unit tests
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> FAIL: The feature is not implemented! Nothing is logged!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

ByWater Sandboxes  changed:

   What|Removed |Added

 Attachment #165245|0   |1
is obsolete||

--- Comment #14 from ByWater Sandboxes  ---
Created attachment 165282
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165282&action=edit
Bug 25996: Unit tests

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

ByWater Sandboxes  changed:

   What|Removed |Added

 Attachment #165244|0   |1
is obsolete||

--- Comment #13 from ByWater Sandboxes  ---
Created attachment 165281
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165281&action=edit
Bug 25996: Make AddDebarment() use Koha::Patron::Restriction

This patch makes the AddDebarment() method use the Koha::Object-based
class to ease the next steps. The current codebase makes the feature
fragile otherwise, as adding a new row and then querying for the latest
row of that kind seems risky,

With this approach the result is the same, but we have the
Koha::Patron::Restriction object for using it later in logging.

I opted to return 1 as it does now. The whole module deserves to be
removed in the future but it is out of the scope of this report.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> SUCCESS: Tests pass
2. Apply this tiny refactoring patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber 

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Tomás Cohen Arazi  changed:

   What|Removed |Added

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

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

--- Comment #12 from Tomás Cohen Arazi  ---
(In reply to Michaela Sieber from comment #9)
> Thanks Tomas for the fast implementation!
> 
> The logging when creating a new restriction works as expected.
> 
> But unfortunately the log for DELETE is not sufficiant because the Info
> field in the Log viewer is empty. Therefor we don't know which debarment_id,
> type, comment or expiration the deleted restriction had.
> But these are the most important information for us, we need to know which
> restriction was deleted.
> 
> Would it be possible to log at least the borrower_debarment_id ?
> Better would be the information about all restriction fields of course ;-)

Done!

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #11 from Tomás Cohen Arazi  ---
Created attachment 165267
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165267&action=edit
Bug 25996: (follow-up) Log the entire object on deletion

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Martin Renvoize  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=31458
 CC||martin.renvoize@ptfs-europe
   ||.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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #10 from Clemens Tubach  ---
The test plans from comment 7 and 8 are working!

-- 
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 25996] Changes to restrictions should be logged

2024-04-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #9 from Michaela Sieber  ---
Thanks Tomas for the fast implementation!

The logging when creating a new restriction works as expected.

But unfortunately the log for DELETE is not sufficiant because the Info field
in the Log viewer is empty. Therefor we don't know which debarment_id, type,
comment or expiration the deleted restriction had.
But these are the most important information for us, we need to know which
restriction was deleted.

Would it be possible to log at least the borrower_debarment_id ?
Better would be the information about all restriction fields of course ;-)

-- 
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 25996] Changes to restrictions should be logged

2024-04-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #8 from Tomás Cohen Arazi  ---
Created attachment 165247
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165247&action=edit
Bug 25996: Add restrictions to the log viewer

This patch adds the new log actions, related to restrictions, to the log
viewer.

To test:
0. Set BorrowersLog to 'Log'
1. Pick a patron
2. Add a restriction and identify it's id, maybe using the DB:
   $ ktd --shell
  k$ koha-mysql kohadev
   > SELECT * FROM borrower_debarments;
3. Run [1]:
  k$ perl -MKoha::Patron::Debarments \
 -e 'Koha::Patron::Debarments::ModDebarment( { borrower_debarment_id =>
195, comment => "potato" } );'
4. Visit the log viewer.
=> SUCCESS: You can filter on 'Create restriction', 'Modify restriction'
and 'Delete restriction', things are displayed correctly.

[1] There's the ModDebarment method in the codebase, but I couldn't find
a way to trigger it for testing, so my last resort was to do it from the
CLI, manually. The tests on the previous patches cover the method
anyway.

Sponsored-by: Karlsruhe Institute of Technology (KIT)

-- 
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 25996] Changes to restrictions should be logged

2024-04-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #7 from Tomás Cohen Arazi  ---
Created attachment 165246
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165246&action=edit
Bug 25996: Add logging to restrictions actions

This patch adds logging for the following actions:

* CREATE_RESTRICITON
* MODIFY_RESTRICTION
* DELETE_RESTRICTION

To test:
1. Apply the unit tests
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> FAIL: The feature is not implemented! Nothing is logged!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)

-- 
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 25996] Changes to restrictions should be logged

2024-04-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #6 from Tomás Cohen Arazi  ---
Created attachment 165245
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165245&action=edit
Bug 25996: Unit tests

Sponsored-by: Karlsruhe Institute of Technology (KIT)

-- 
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 25996] Changes to restrictions should be logged

2024-04-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #5 from Tomás Cohen Arazi  ---
Created attachment 165244
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165244&action=edit
Bug 25996: Make AddDebarment() use Koha::Patron::Restriction

This patch makes the AddDebarment() method use the Koha::Object-based
class to ease the next steps. The current codebase makes the feature
fragile otherwise, as adding a new row and then querying for the latest
row of that kind seems risky,

With this approach the result is the same, but we have the
Koha::Patron::Restriction object for using it later in logging.

I opted to return 1 as it does now. The whole module deserves to be
removed in the future but it is out of the scope of this report.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> SUCCESS: Tests pass
2. Apply this tiny refactoring patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)

-- 
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 25996] Changes to restrictions should be logged

2024-04-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Tomás Cohen Arazi  changed:

   What|Removed |Added

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

-- 
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 25996] Changes to restrictions should be logged

2024-04-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Michaela Sieber  changed:

   What|Removed |Added

  Change sponsored?|Seeking developer   |Sponsored
   Assignee|koha-b...@lists.koha-commun |tomasco...@gmail.com
   |ity.org |

-- 
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 25996] Changes to restrictions should be logged

2024-03-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Michaela Sieber  changed:

   What|Removed |Added

 CC||clemens.tub...@kit.edu

-- 
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 25996] Changes to restrictions should be logged

2024-03-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Michaela Sieber  changed:

   What|Removed |Added

  Change sponsored?|--- |Seeking developer

--- Comment #4 from Michaela Sieber  ---
+1

-- 
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 25996] Changes to restrictions should be logged

2024-01-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #3 from Rebecca Coert  ---
(In reply to Christopher Brannon from comment #1)
> Very, very bad.  Much bad.  Needs fixed.

I agree with Christopher.  This needs to be fixed.

-- 
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 25996] Changes to restrictions should be logged

2023-11-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Michaela Sieber  changed:

   What|Removed |Added

 CC||michaela.sie...@kit.edu

-- 
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 25996] Changes to restrictions should be logged

2023-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

--- Comment #2 from Rebecca Coert  ---
Tested this on 22.11 and it's still showing as Andrew described in 2020.  This
needs to be fixed.

-- 
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 25996] Changes to restrictions should be logged

2023-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Rebecca Coert  changed:

   What|Removed |Added

 CC||rco...@arlingtonva.us

-- 
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 25996] Changes to restrictions should be logged

2023-08-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Katie Bliss  changed:

   What|Removed |Added

 CC||kebl...@dmpl.org

-- 
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 25996] Changes to restrictions should be logged

2023-08-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Christopher Brannon  changed:

   What|Removed |Added

 CC||cbran...@cdalibrary.org

--- Comment #1 from Christopher Brannon  ---
Very, very bad.  Much bad.  Needs fixed.

-- 
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 25996] Changes to restrictions should be logged

2023-08-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996

Lisette Scheer  changed:

   What|Removed |Added

 CC||lisette.scheer@bywatersolut
   ||ions.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 25996] Changes to restrictions should be logged

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

Katrin Fischer  changed:

   What|Removed |Added

 Blocks||22794


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22794
[Bug 22794] Omnibus: Improve and extend logging in Koha
-- 
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 25996] Changes to restrictions should be logged

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

Katrin Fischer  changed:

   What|Removed |Added

Summary|Changes to debarments   |Changes to restrictions
   |should be logged|should be logged

-- 
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/