Releases: jundis/CWSlack-SlashCommands
Bug fixes for 2.5
- Added cwslack-lunch-cron.php and documented in ReadMe
- Updated lunch command to no longer show in chat by default, can be uncommented on line 47 of cwslack-lunch.php to undo this change.
- Fixed issue where stats module didn't create new users in the table.
Lunch, Priorities, Stats, and Fixes
Lots of stuff because I haven't pushed a version change in forever
New Module PriorityAlerts (#115): Allows you to send alerts whenever a certain priority level of ticket is too far past time. E.x. if a "High" priority ticket is in scheduled status at 11:30AM, and was scheduled for 11:00AM, send an alert to the tech so they know they've missed something important.
New Module Lunch (#117): Allows you to use /lunch to set yourself on lunch, then /lunch again to take yourself off lunch. Supports sending slack messages, e-mails (only if you manually configure config.php, not through upgrade script), entering time entries, and adding schedule entries to block it off on the schedule.
New Module Stats: Adds a basic database table to track who is using what commands, and when they last used any command. Not turned on by default, and not part of upgrade script. Manually add the code to config from commit d13ee09 if you intend to use it.
- All: Updated copyright years, and then again for 2018.
- Contacts: Fixed extensions so they actually appear if there is one attached to the number.
- FirmAlerts: Break MySQL connection out of loop so it doesn't constantly reconnect for no reason
- Notes: Allow notes without type specified as long as you specify $defaultnotetype.
- Tickets: Last updated by is now included in /t info
- Tickets: Allow ticket status to be updated after using /t schedule and /t scheduleme functions by setting $schedulestatus
- Tickets: Fixed resource line not working in ConnectWise v2017.5. From issue #118
- Tickets/Contacts: Fixed undefined properties error that cropped up after v2017.5
- Time: Time entries now properly accept "h" shorthand. From issue #112
- TimeAlerts: Added $specialtimeusers so you can set hours specifically for different techs, if they have different hours than the business start and close entries.
Maintenance edition
- ALL: There is a new $connectwisebranch variable for companies that joined Hosted after they stopped using v4_6_release. This allows you to change this as your release changes.
- ALL: A new $sendtimeoutwait variable has been added, which when set to true will respond to all commands with "Please wait..." to just the user before sending its data. This is for slow servers to make sure users don't think it isn't working. Only functions with $timeoutfix set to true.
- ALL: Debug mode for testing/troubleshooting purposes. Enable via $debugmode at the end of config.php and you'll get raw cURL data back for everything.
- Tickets: Fix for creating new tickets without a board specified while on ConnectWise v2017.1
- Contacts: No longer show inactive contacts by default, but variable $inactivecontacts will turn them back on. Thanks @briangig
- Contacts: Fixed contacts not being properly searched on v2017.2
- Contacts: Added support for extensions in phone numbers, now will appear as ###-###-### x### if it has an extension.
- Incoming: Changes to the workflow rules detection, so no workflow rule based updates should come through, heavily reducing the spam when $postupdated is turned on. As part of this, $allowzadmin has been deprecated.
- Incoming: Further bug fixes to fix issue with tickets without text from posting, should be good this time... Hopefully.
- Incoming: New board mapping function using $boardmapping, deprecated previous method using board= in the callback URL, but that method will still work, it has not been removed from the code.
- "CWMattermost": Fixed issue where Mattermost would not work as it used POST instead of GET requests. Updated all files to allow for better compatibility.
Time Reporting, Alerting, and some big issue fixes.
- ALL: Introduced the $timeoutfix variable, which when enabled will prevent the Slack 3000ms timeout from stopping responses. Recommended for all slow responding CW instances and for the use of /t # full and time reporting
- ALL: Fixed fairly high priority issue where you could SQL inject using commands, per issue #91.
- Tickets: Specifying "all" or "full" as the optional command with /t (e.x. /t 51823 full) will now show ALL notes on the ticket. May time out if you do not have $timeoutfix set to true.
- Tickets: Now specifies whether a note is external or internal facing.
- Tickets: Fixed a bug where new tickets made using company names that included spaces errored out. Issue #88
- Times: New reporting functions /times report and /times reportall. With many users this may fail without $timeoutfix being set to true.
- New TimeAlerts Module: Setup using cron/task scheduler like FirmAlerts, this module will send your users and optionally a channel a message whenever their time is behind by 2 hours or more.
- Config.php: Changed default name from config.php to config-default.php so that users can use GitHub automatic updating without it overwriting. Catches in install if you don't have it renamed.
- Config.php: Deprecated file based Follow support, removed from config file.
2.2: Now with ticket creation, scheduling, and status/priority updating!
- Tickets: New ticket creation using /t new
- Tickets: Ticket scheduling using /t ### scheduleme and /t ### schedule
- Tickets: Fixed /t ### priority and /t ### status to use word value instead of ID
- Tickets: Fixed issue #78 which caused some tickets without notes to generate errors in Slack output.
- Configs: New variable $hidepasswords will hide any fields named Password from being sent to Slack.
- Configs: Fixed issue with required functions being missing.
- License: Updated license statement for install.php and update scripts.
Times and Tasks modules, and more bug fixes
Full Changelog:
- Tasks: New module for managing tasks in ConnectWise tickets. Allows for creating and updating tasks.
- Time: New module for submitting closed loop time entries in ConnectWise tickets. Submitting a time entry for 5 minutes will substract 5 minutes from the current time and make that the start point.
- Incoming: Now allows you to send specific ticket boards to specific channels. See readme.md for more information on setting this up.
- Updater: New updater script to migrate from 2.0 to 2.1. Just updates the config.php with the new variables in 2.1.
- Follow: Fixed CW links not using MySQL database per #60, thanks @adamhancock for the leg work!
- Incoming: Added catch for just browsing to cwslack-incoming.php so it isn't just a flood of errors.
- Installer: Fixed issue with the $usedatabase line, causing it to screw up the flatfile portion of config.php.
- Tickets: Fixed error with /t on tickets that only had time entries for notes, per #61.
- Tickets: Changed status and priority updates to use ephemeral notes, since the channel you're in doesn't need to know you changed something.
- Functions: Fixed error in the error catcher! Accidentally was using $dataTData as a reference for errors, switched it to the proper $jsonDecode.
MySQL and Install script
Full changelog:
- Incoming: Add identifier to notes to show internal vs external note for issue #50
- Incoming: Add date/time to all notes for issue #51
- All: Refactor numerous back end code, removed useless lines, creating a new functions.php file that is REQUIRED for all files to work properly. Per issue #53
- All: Completely redo error codes to make them handle much better.
- Notes and FirmAlerts: Implemented MySQL code to be able to map usernames by either modifying SQL manually or using /dbm
- Follow and Incoming: Converted /follow to use MySQL for storing data. Can be completely cleared with /dbm clearfollow
- DBManage: New module for controlling the MySQL database. See /dbm help for more info, Slack name must be in $adminlist to use.
- Install Script: New install script to comfigure everything from scratch. Recommended everyone use for 2.0 release.
E-mails for notes and bug fixes galore!
With this update I've added the ability to send e-mails using the /note function in the Notes module as well as fixed a few bugs. I highly recommend updating the Incoming module to avoid missing new tickets.
- All Modules: Better error text. Instead of just killing the connection with die(), it will provide an error message on why it's doing this.
- Contacts: Fixed a null error for contacts without a site attached for issue #44
- Documentation: Typo fixes, pull #42. Thanks @damiankw!
- Incoming: Added extra data to incoming notifications so it now displays the user who made/updated the ticket, instead of just saying "New Ticket" or "Updated Ticket". This will apply to followed tickets, time alerts, and normal incoming tickets.
- Incoming: Fixed issue where tickets created without any internal or external note would not post to Slack when $posttext was set to 1, per issue #48.
- FirmAlerts: Added a variable ($usetimechan) so you can choose to set the channel for firm alerts to be different than those of the time alerts. Default to 1. Per suggestion #49.
- Notes: Added the "externalemail" option, which allows the note you are posting to process e-mails according to what is the default e-mail targets on that ticket.
Please submit all feedback through the GitHub issues page or message me on Reddit!
FirmAlerts and other enhancements!
- Contacts module: #30 / #32 bug fix, now returns company phone number only if they have no contact info themselves.
- Configs module: Include link to configuration.
- Configs module: Now only searches active configurations
- Configs module: Now accepts just a configuration name in addition to previously used company|config
- Incoming module: Per suggestion #35, now allows for posting to a specific channel when an hour threshold (default 1 hour) is reached on any ticket.
- Incoming module: Per suggestion #36, now includes company name in notifications. Thanks @damiankw
- FirmAlerts module: Per suggestion #39, new module which will send a notification to users when their schedule entries marked firm hit the reminder threshold set on the entry, as well as notify both the user and a specified channel (controlled by $timechan) when the firm appointment is to start. Requires users name in ConnectWise be the same as in Slack, just like the /note module.
New configs function and bug fixes
- Fixed multiple error issues
- Added note time to /t commands
- Added cwslack-configs.php