Closed (fixed)
Project:
Send Notification to Slack
Version:
8.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2019 at 07:49 UTC
Updated:
16 Dec 2019 at 05:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pratik_kambleStarting work on it.
Comment #3
msutharsComment #4
msutharsI created a patch where I used the token module to show the available tokens.
Comment #5
msutharsComment #6
msutharsComment #7
pratik_kamble@msuthars, Thanks for the patch. There are some modifications that need to be done.
Please check the below reports.
Comment #8
msutharsComment #9
pratik_kambleComment #10
pratik_kambleComment #11
msutharsDrupal coding standard changes.
Comment #12
msutharsComment #13
naresh_bavaskarComment #14
naresh_bavaskarComment #15
naresh_bavaskarHi @msuthars,
I have added a composer file to manage the dependencies of this module. Please find the attached modified patch.
Comment #16
naresh_bavaskarComment #17
Lal_I might be wrong but I think an update hook is needed to check if the module is enabled for the existing site... or this could an another release.
Comment #18
msuthars@lal_ I don't think so we need to add an update hook, because we already added the condition according to the token module in code. So if the token module is not available then it will be handled according to condition.
Comment #19
pratik_kamble@msuthars and @naresh_bavaskar, I don't see any token module in drupal core. It is part as the utility. Update info file to contain token:token as dependency (Contrib Module). Let's create hook_update() to enable the token module. Remove the code to check token module is enabled or not in the Form.
Node, User and Site Information token types should be available.
Comment #20
pratik_kambleComment #21
naresh_bavaskarComment #22
naresh_bavaskar@pratik_kamble @lal
Enabled dependent token module as a dependency and removed token condition module in the above patch. Please have a look into it
Comment #23
pratik_kamble@naresh_bavaskar in notify_to_slack.info.yml it should be `token:token` as the dependency.
Comment #24
snehalgaikwad commentedGlobal tokens are added and dependency changed from drupal:token to token:token.
Comment #26
pratik_kambleComment #27
naresh_bavaskar@snehal
one minor change is required in hook_update
there is typo hook_update (token1)
Comment #28
pratik_kamble@naresh_bavaskar, thanks for pointing out the issue. I have fixed it.
Comment #29
pratik_kamble