Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send unique notification via Email per user #28

Merged
merged 9 commits into from Dec 8, 2019

Conversation

Chemaclass
Copy link
Owner

@Chemaclass Chemaclass commented Dec 4, 2019

Description

In order to avoid spam via email, we should send a unique email per user with all the tickets information that the user is assigned to.

@Chemaclass Chemaclass added enhancement New feature or request improvement Refactoring or cleaning related labels Dec 4, 2019
@Chemaclass Chemaclass added this to In progress in Notify throw different channels via automation Dec 4, 2019
@Chemaclass Chemaclass changed the title [WIP] Send unique notification per user Send unique notification per user Dec 5, 2019
Copy link
Collaborator

@JesusValera JesusValera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome :)) 👍

@@ -66,7 +66,7 @@ private function postToSlack(Company $company, array $tickets, array $jiraUsersT

$response = $this->slackClient->postToChannel(
$this->slackMapping->toSlackId($ticket->assignee()->name()),
$this->messageGenerator->forJiraTicket($ticket, $company->companyName())
$this->messageGenerator->forJiraTickets([$ticket], $company->companyName())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why in the email you pass an array and here you transform the $thicket var into an array manually?
I mean, what is the difference between slack and email and why $ticket is not already an array?

Copy link
Owner Author

@Chemaclass Chemaclass Dec 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this issue (PR) was thinking in a way of pure Email\Channel, without modifying (or at least as less at possible) the Slack\Channel.
Actually, I/we might create another PR where we are doing this same feature-idea to the Slack\Channel as well.
BUT in order to keep it simple, I decided to focus this PR only for the Email\Channel, because, actually, the Slack\Channel is not really hurt by these multiple notifications (aka 1 message per ticket) :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I got it.
Nice then! >:D

@Chemaclass Chemaclass merged commit e5e8040 into master Dec 8, 2019
@Chemaclass Chemaclass deleted the send-unique-notification-per-user branch December 8, 2019 08:12
@Chemaclass Chemaclass changed the title Send unique notification per user Send unique notification via Email per user Dec 8, 2019
@Chemaclass Chemaclass moved this from In progress to Done in Notify throw different channels Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request improvement Refactoring or cleaning related
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants