E-mails notification for Hackzilla Ticketing Bundle
Simple add-on bundle that is build on top of Hackzilla Ticketing bundle in order to provide automatic e-mails
notifications when a ticket is created or modified. The ticket's owner and every user with the role ROLE_TICKET_ADMIN get notified., (*1)
Requirements
- PHP >= 5.6
- Symfony ~2.8|~3.0
- Ticketing Bundle ~3.0 see: https://github.com/hackzilla/TicketBundle
- VichUploaderBundle ~1.0
Installation
Step 1: Make sure you already have HackzillaTicketBundle
Make sure HackzillaTicketBundle is already present in your composer.json:, (*2)
{
"require": {
"hackzilla/ticket-bundle": "~2.0@dev",
"friendsofsymfony/user-bundle": "~2.0@dev",
"vich/uploader-bundle": "~1.0"
}
}
Also make sure the Attachments additionnal feature is enabled., (*3)
Step 2: Download the bundle using composer
Require the bundle with composer:, (*4)
$ composer require flodaq/ticket-notification-bundle "^1.0@dev"
Composer will install the bundle to your project's vendor/flodaq/ticket-notification-bundle directory., (*5)
Step 3: Enable the bundle
Enable the bundle in the kernel:, (*6)
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new Flodaq\TicketNotificationBundle\FlodaqTicketNotificationBundle(),
// ...
// Your application bundles
);
}
Add the following configuration to your config.yml file according to your e-mails sender's information., (*7)
config.yml
flodaq_ticket_notification:
emails:
sender_email: 'email@example.com'
sender_name: 'Firstname LASTNAME'
Step 5: Custom templates (optional)
You can override default e-mails templates by configuring your custom ones in the config.yml file., (*8)
config.yml
flodaq_ticket_notification:
templates:
new_html: 'YOURTicketBundle:Emails:ticket.new.html.twig'
new_txt: 'YOURTicketBundle:Emails:ticket.new.txt.twig'
update_html: 'YOURTicketBundle:Emails:ticket.update.html.twig'
update_txt: 'YOURTicketBundle:Emails:ticket.update.txt.twig'
Pull requests
I'm open to pull requests for additional features and/or improvements., (*9)