Bug 30955 - Send a notice to new owner when transferring shared list
Summary: Send a notice to new owner when transferring shared list
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jake Deery
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-13 12:51 UTC by Marcel de Rooy
Modified: 2024-11-18 23:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a new notice, TRANSFER_OWNERSHIP, under a new module, Lists. When a list is transferred to a new owner, this notice is triggered, containing a short paragraph detailing the list name.
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 30955: Sends notice to new owner at transfer (10.70 KB, patch)
2024-07-15 11:25 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (11.11 KB, patch)
2024-07-19 17:40 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (10.74 KB, patch)
2024-07-22 08:38 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (10.62 KB, patch)
2024-08-27 08:57 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (10.67 KB, patch)
2024-08-28 15:48 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30955: (follow-up) Remove database update (1.61 KB, patch)
2024-10-07 08:33 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (9.26 KB, patch)
2024-10-07 09:00 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (9.39 KB, patch)
2024-10-23 13:31 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30955: (QA follow-up) Reduce database hits and clarify notice (3.43 KB, patch)
2024-10-23 13:31 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (9.39 KB, patch)
2024-10-23 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30955: (QA follow-up) Reduce database hits and clarify notice (7.37 KB, patch)
2024-10-23 13:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30955: (follow-up) Merged related notices into lists (6.31 KB, patch)
2024-10-24 08:15 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 30955: Sends notice to new owner at transfer (9.38 KB, patch)
2024-10-24 09:06 UTC, Jake Deery
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2022-06-13 12:51:54 UTC
See bug 25498.
Would be helpful to send a notice to inform the new owner of this change.
Comment 1 Jake Deery 2024-07-15 11:25:59 UTC
Created attachment 168970 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice
Comment 2 Jake Deery 2024-07-15 11:27:22 UTC
Thanks in advance for a sign-off :-)

Jake
Comment 3 Roman Dolny 2024-07-19 17:40:52 UTC
Created attachment 169252 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

QA script unhappy:
FAIL   installer/data/mysql/atomicupdate/bug_30955-add-new-notice.pl
  FAIL   forbidden patterns
    forbidden pattern: tab char (line 1)
  WARN   tidiness
    The file is less tidy than before (bad/messy lines before: 0, now: 13)

WARN   t/db_dependent/Koha/Virtualshelf.t
  WARN   tidiness
    The file is less tidy than before (bad/messy lines before: 9, now: 12)
Comment 4 Jake Deery 2024-07-22 08:38:13 UTC
Created attachment 169267 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 5 Jake Deery 2024-07-22 08:39:05 UTC
Yes, it was a bit ugly, apologies! Fixed now :-)
Comment 6 Jake Deery 2024-08-27 08:57:33 UTC
Created attachment 170748 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 7 Jake Deery 2024-08-27 08:59:24 UTC
Rebased atop the Bootstrap5 changes. As this only includes a 22-character change on one line, and the change is purely cosmetic, I have left the sign-off line in.

Please feel free to revert this status if this was not the right thing to do.

Jake.
Comment 8 Lucas Gass (lukeg) 2024-08-27 17:06:30 UTC
Nice, Jake. I was wondering if we need a mechanism for turning this off. I can just delete the notice. Right now this would just start sending TRANSFER_OWNERSHIP notices when libraries upgraded. 

Should we have an on/off switch that libraries have to turn on?
Comment 9 Jake Deery 2024-08-27 19:29:44 UTC
Hey Lucas,

I suppose we have three options, here:
a)  don't include a notice out of the box, and let libraries figure out the new notice exists
b)  add a syspref for this (yet another syspref?)
c)  include the notice, let the notices fly, and propose we won't upset anyone

Happy to go with any of these, though a syspref does seem a bit bonkers for this?

Jake.
Comment 10 Lucas Gass (lukeg) 2024-08-28 15:46:15 UTC
(In reply to Jake Deery from comment #9)
> Hey Lucas,
> 
> I suppose we have three options, here:
> a)  don't include a notice out of the box, and let libraries figure out the
> new notice exists
> b)  add a syspref for this (yet another syspref?)
> c)  include the notice, let the notices fly, and propose we won't upset
> anyone
> 
> Happy to go with any of these, though a syspref does seem a bit bonkers for
> this?
> 
> Jake.

Jake, I agree with you. Sys pref is bonkers. I think, in this case we should include the notice and let em fly. 

Which I think means all is well here, no additional work needed.
Comment 11 Lucas Gass (lukeg) 2024-08-28 15:48:00 UTC
Created attachment 170826 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 12 Jake Deery 2024-08-28 15:59:28 UTC
Wicked, thanks for your time Lucas!

Jake.
Comment 13 Katrin Fischer 2024-08-30 14:37:15 UTC
Some hopefully smaller stuff here:

1) This patch introduces a new notice category: Lists.

I think this is a good idea, but right now this will only contain one notice, wihle the other list related ones are still under OPAC, creating an inconsistency. I see 2 options:

* Add the new category on a separate bug and then move all the notices into it at the same time
* Move them here, notices are: LIST, SHARE_INVITE, SHARE_ACCEPT

2) The big question: add notice on update or not.

I just pushed another bug recently that decided to not add on update. I think we could probably argue for both. But maybe we should try to have some guideline/consistency here?

Bug 36915 - Send email notification when a booking is cancelled

Don't add on update
* Least surprise, no behavior change
* Libraries will not miss to translate/adapt the notice text to local guidelines

Add on update
* Libraries can see how the notice looks like. But: bug 36815 will help with that now.

I am leaning towards removing the database update right now. But happy to discus and be persuaded.
Comment 14 Jake Deery 2024-10-07 07:48:29 UTC
Hi Katrin,

Agree on point 1) – I can create a new bug for this shortly.

On point 2) – I am happy to go with removing the database update, but it raises a question for me: should we have a repository of default notices for libraries to refer to? 

Jake.
Comment 15 Katrin Fischer 2024-10-07 08:00:20 UTC
(In reply to Jake Deery from comment #14)
> Hi Katrin,
> 
> Agree on point 1) – I can create a new bug for this shortly.
> 
> On point 2) – I am happy to go with removing the database update, but it
> raises a question for me: should we have a repository of default notices for
> libraries to refer to? 
> 
> Jake.

We have had them on the wiki so far, but with Martin's new feature, one should be able to get the sample notice content once the notice with the right code has been created: bug 36815
Comment 16 Jake Deery 2024-10-07 08:31:18 UTC
Interesting! Let's drop that databsae update, then. As there is a way of 'getting the default' now, its easy for librarians to get the notice working quickly :-)

Jake.
Comment 17 Jake Deery 2024-10-07 08:33:08 UTC
Created attachment 172443 [details] [review]
Bug 30955: (follow-up) Remove database update
Comment 18 Jake Deery 2024-10-07 08:33:40 UTC
Gone!

Jake.
Comment 19 Katrin Fischer 2024-10-07 08:52:23 UTC
Would you mind squashing them? :)
Comment 20 Jake Deery 2024-10-07 09:00:12 UTC
Created attachment 172445 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 21 Jake Deery 2024-10-07 09:00:43 UTC
Done..! :-)

Jake.
Comment 22 Martin Renvoize (ashimema) 2024-10-23 13:31:03 UTC
Created attachment 173213 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Martin Renvoize (ashimema) 2024-10-23 13:31:06 UTC
Created attachment 173214 [details] [review]
Bug 30955: (QA follow-up) Reduce database hits and clarify notice

This patch updates the library selection from using the new owners home
library to using the current sessions library in keeping with the
direction of travel in other bugs of this type in Koha currently.

We also update the default notice text to clarify who sent the notice vs
who previously owned the list.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize (ashimema) 2024-10-23 13:33:56 UTC
Created attachment 173215 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize (ashimema) 2024-10-23 13:33:59 UTC
Created attachment 173216 [details] [review]
Bug 30955: (QA follow-up) Reduce database hits and clarify notice

This patch updates the library selection from using the new owners home
library to using the current sessions library in keeping with the
direction of travel in other bugs of this type in Koha currently.

We also update the default notice text to clarify who sent the notice vs
who previously owned the list.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 26 Katrin Fischer 2024-10-24 07:09:40 UTC
1) Follow-up bug or patch

(In reply to Katrin Fischer from comment #13)
> Some hopefully smaller stuff here:
> 
> 1) This patch introduces a new notice category: Lists.
> 
> I think this is a good idea, but right now this will only contain one
> notice, wihle the other list related ones are still under OPAC, creating an
> inconsistency. I see 2 options:
> 
> * Add the new category on a separate bug and then move all the notices into
> it at the same time
> * Move them here, notices are: LIST, SHARE_INVITE, SHARE_ACCEPT

(In reply to Jake Deery from comment #14)

> Agree on point 1) – I can create a new bug for this shortly.

Can you please do that? I think we should do this for 24.11 to have a consistent state. It should be an easy database update to move these notices.

2) Is this authorship line correct?

From: PerplexedTheta <jahdobble@llownd.net>


Waiting for 2).
Comment 27 Jake Deery 2024-10-24 08:15:12 UTC
Created attachment 173254 [details] [review]
Bug 30955: (follow-up) Merged related notices into lists

This patch merges the SHARE_ACCEPT and SHARE_INVITE notices into the
lists module. This makes a clearer case for introducing the lists module
in the first place.
Comment 28 Jake Deery 2024-10-24 08:15:46 UTC
Let me know if you want those squashing once you've had a look :-)

Jake.
Comment 29 Jake Deery 2024-10-24 08:17:22 UTC
Oh, and, I think we had this problem before with the author line. It was because I was pushing a few patches from my other laptop :/

Can we update the mailmap to solve this, or can I change this some other way?

Jake.
Comment 30 Katrin Fischer 2024-10-24 08:41:55 UTC
(In reply to Jake Deery from comment #29)
> Oh, and, I think we had this problem before with the author line. It was
> because I was pushing a few patches from my other laptop :/
> 
> Can we update the mailmap to solve this, or can I change this some other way?
> 
> Jake.

You can change the author-line in git. I think it's something like git commit --amend --author (to use your current config). Otherwise please check docs :)

It's not pushed yet, so that's why I was waiting.
Comment 31 Jake Deery 2024-10-24 09:06:22 UTC
Created attachment 173255 [details] [review]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Jake Deery 2024-10-24 09:07:48 UTC
Thanks for the advice, cait – all sorted :-)

Jake.
Comment 33 Katrin Fischer 2024-10-24 12:05:15 UTC
Sequence of patches got a bit messed up. When reattaching, please always reattach all patches! Will fix with git bz apply -i
Comment 34 Jake Deery 2024-10-24 14:50:46 UTC
Thanks cait, another one to remember for the future :-)

Jake.
Comment 35 Katrin Fischer 2024-10-24 14:56:56 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 36 Lucas Gass (lukeg) 2024-11-18 23:04:58 UTC
Enhancement, no 24.05.x backport