I'm a new Slack user. I would like to be able to categorize my notifications in Slack by content type. So my feature request is to have the option of assigning a different Slack channel to each content type. I envision other users creating content types and wanting to decide which channel notifications will go to.

Thanks and best regards,

Steve (I submitted the related issue below under a different name)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sbrown1038 created an issue. See original summary.

sbrown1038’s picture

pratik_kamble’s picture

Assigned: Unassigned » pratik_kamble
Lal_’s picture

Assigned: pratik_kamble » Lal_
Lal_’s picture

FileSize
2.43 KB

Well, as of now this will gonna do the trick but it would be much better if we have more structured data so that it will be less confusing

Lal_’s picture

Status: Active » Needs review
ambuj_gupta’s picture

Assigned: Lal_ » ambuj_gupta
ambuj_gupta’s picture

FileSize
84.87 KB

It is working as expected, but while Testing observed two issues:

  1. As a user, once I add the channel name for any content type, then after I'm not able to remove(empty) the earlier added channal name
  2. Change the label of slack channel name input box, it should be unique. For example: For Article Content-Type, Select the channel for Article Content-Type. Refer screenshot

Hi @Lal_, Please fix above mentioned issue.

Lal_’s picture

FileSize
2.42 KB

@ambuj30oct good catch

Lal_’s picture

FileSize
2.42 KB

quick fix

ambuj_gupta’s picture

Tested and verified the module after adding the patch created by @Lal_. And it is working as expected.

ambuj_gupta’s picture

Assigned: ambuj_gupta » Unassigned
Status: Needs review » Reviewed & tested by the community
pratik_kamble’s picture

Status: Reviewed & tested by the community » Needs work

@Lal_ As per functionality-wise patch looks good but there are coding standard issues. Please fix them.

FILE: ...en_source/modules/contrib/notify_to_slack/notify_to_slack.module
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 61 | ERROR | [x] Expected 1 space before "?"; 0 found
 61 | ERROR | [x] Expected 1 space after "?"; 0 found
 61 | ERROR | [x] Expected 1 space before ":"; 0 found
 61 | ERROR | [x] Expected 1 space after ":"; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...source/modules/contrib/notify_to_slack/src/Form/SettingsForm.php
----------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------
  97 | ERROR   | [x] Expected 1 space after closing parenthesis;
     |         |     found 0
 100 | WARNING | [ ] Translatable strings must not begin or end with
     |         |     white spaces, use placeholders with t() for
     |         |     variables
 101 | ERROR   | [x] There should be no white space after an opening
     |         |     "("
 101 | ERROR   | [x] Concat operator must be surrounded by a single
     |         |     space
 110 | ERROR   | [ ] If the line declaring an array spans longer than
     |         |     80 characters, each element should be broken
     |         |     into its own line
 194 | ERROR   | [x] Expected 1 space after closing parenthesis;
     |         |     found 0
 195 | ERROR   | [x] Line indented incorrectly; expected 6 spaces,
     |         |     found 8
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Lal_’s picture

Status: Needs work » Needs review
FileSize
2.57 KB

oops missed that

  • pratik_kamble committed e723ab3 on 8.x-1.x authored by Lal_
    Issue #3084042 by Lal_, ambuj30oct: Assign A Different Slack Channel To...
pratik_kamble’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.