Claromentis / app-thankyou

A simple application to say thanks to fellow employees. Example of Claromentis application structure.
3 stars 1 forks source link

CB_notifs - thank multiple users with the same manager: line manager receives notification per user #33

Closed olganovosad closed 5 years ago

olganovosad commented 5 years ago

Hello,

As I have understood we sent notification per user to line manager.

What if manager has got several people under management and all of them being thanked in Thank you component?

Currently, line manager receives notification per user which might be a lot in some cases.

Let me know if I'm missing something here and it's expected Olia's - Home Page 2019-03-27 15-22-23

olganovosad commented 5 years ago

27

andy-ce-taylor commented 5 years ago

This isn't mentioned in the prototype but it's a sensible suggestion.

The problem, as far as I can see, is that the message subject could potentially get very long:

Adam Andrews said thank you to Brian Baxter, Carol Carruthers, David Daniels, Elizabeth Ellison, etc

One solution would be to show a maximum of (say) 2 recipents in the subject:

Adam Andrews said thank you to Brian Baxter, Carol Carruthers and 23 others

The body of the message (which currently shows the description) would also include the list of recipients.

hexus commented 5 years ago

Yes, so you'll want to send one notification per line manager in this case.

Right now your code is sending one notification per-recipient.

https://github.com/Claromentis/app-thankyou/pull/27/files#diff-8558d69023df24cc65a436d3809de12cR11

andy-ce-taylor commented 5 years ago

I've implemented the change as described in my earlier post.

olganovosad commented 5 years ago

if there is one manager for multiple users - 1 line manager notification received. If different managers are set for different users - every manager received notification