Giter Club home page Giter Club logo

ticketbundle's Introduction

Hackzilla Ticket Bundle

Simple ticketing bundle for any project.

Test Quality assurance Lint SensioLabsInsight

Requirements

You can see the full requirement definitions for each available version in Packagist.

Setup

Optional features

These optional features that can be turned on or off.

Features

Optional integrations

3rd party extensions

Translations

Built in translations are available for the following languages:

  • Dutch
  • English
  • French
  • German
  • Italian
  • Portuguese
  • Russian
  • Spanish

Demo

See Ticket Bundle Demo App for an example installation. This can also be used for confirming bugs.

Migrate a previous version

Pull requests

I'm open to pull requests for additional languages, features and/or improvements.

ticketbundle's People

Contributors

bghosts avatar carlowens avatar cesarve77 avatar cvele avatar filoz avatar grimmlink avatar hackzilla avatar leroy0211 avatar marcelglaeser avatar masonen avatar mistris avatar mogilvie avatar paulrenvoise avatar phansys avatar simohammedhttp avatar simonseggewiss avatar studiomax avatar ukwm-deploy avatar yhanini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ticketbundle's Issues

Packagist

Is this bundle available on packagist ?

[Insight] Unused method, property, variable or parameter - in Manager/UserManager.php, line 12

in Manager/UserManager.php, line 12

This authorizationChecker attribute is declared but never used. You should remove it.

use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;

class UserManager implements UserManagerInterface
{
    private $authorizationChecker;
    private $tokenStorage;
    private $userRepository;

    public function __construct(
        AuthorizationChecker $authorizationChecker,

Posted from SensioLabsInsight

Error after closing ticket

Hi,

I got this in my log after closing a ticket (and a 500 error on prod) :

[2016-01-26 12:39:21] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Argument 1 passed to Symfony\Component\Form\FormRenderer::renderBlock() must be an instance of Symfony\Component\Form\FormView, null given, called in /var/www/m1/app/cache/prod/twig/fb/fb2820cadc4586d352da32dddc9c60d30e595af054396b96ea7d6e9aa87a946d.php on line 213 and defined") in "HackzillaTicketBundle:Ticket:show.html.twig" at line 78." at /var/www/m1/app/cache/prod/classes.php line 5245 {"exception":"[object](Twig_Error_Runtime%28code: 0%29: An exception has been thrown during the rendering of a template %28"Catchable Fatal Error: Argument 1 passed to Symfony\Component\Form\FormRenderer::renderBlock%28%29 must be an instance of Symfony\Component\Form\FormView, null given, called in /var/www/m1/app/cache/prod/twig/fb/fb2820cadc4586d352da32dddc9c60d30e595af054396b96ea7d6e9aa87a946d.php on line 213 and defined"%29 in "HackzillaTicketBundle:Ticket:show.html.twig" at line 78. at /var/www/m1/app/cache/prod/classes.php:5245, Symfony\Component\Debug\Exception\ContextErrorException%28code: 0%29: Catchable Fatal Error: Argument 1 passed to Symfony\Component\Form\FormRenderer::renderBlock%28%29 must be an instance of Symfony\Component\Form\FormView, null given, called in /var/www/m1/app/cache/prod/twig/fb/fb2820cadc4586d352da32dddc9c60d30e595af054396b96ea7d6e9aa87a946d.php on line 213 and defined at /var/www/m1/vendor/symfony/symfony/src/Symfony/Component/Form/FormRenderer.php:106)"} []

In dev env i get this :

Variable "form" does not exist in HackzillaTicketBundle:Ticket:show.html.twig at line 78

Reason is here : https://github.com/hackzilla/TicketBundle/blob/master/Controller/TicketController.php#L142

I guess adding {% if form is defined %} in the twig should fix it

Assign ticket to someone

Thanks for sharing this projet.

If you have not already planned, it would be logic to have a functionality for assigning to somone a ticket. Even with notification by email.

Add sensio/framework-extra-bundle to composer.json

I install this bundle and expend some time trying to understand why my implementation doesn't work. The issue was that the showAction (and some others) use the sensio framework bundle showAction(Ticket $ticket=null)

It would be nice if the composer has this information.

Thank you for this bundle!

Documentation for v3

Add documentation for

  • attachments
  • entities (models, traits)
  • bot for telegram #28

Reorganise so not all in README.md

Original creator of ticket changes when updating

When a ROLE_TICKET_ADMIN displays a ticket created by a standard user, the ticket's creator is changed to the current user (only on the display), the admin, and when he updates it, the creator is changed in the database.

Additional details: I didn't change the index method in the controller and I added a column displaying the creator of the ticket : entity.userCreatedObject. It keeps showing the user currently logged in (the admin) although the id of the creator in the database is correct.

Travis Failing

Travis is failing because of deprecated warnings.

Can't figure out how to stop PHPUnit throwing them, or travis to ignore them.

Design improvment

Hello there,

i'v made some design improvements, if you are interested i can do a PR:

image

image

image

image

Minimum Symfony Version

I'm looking at Symfony 3.0 (#43) compatibility.

There are some changes in Symfony 2.6, that would involve losing Symfony 2.3 compatibility.
Also in Symfony 2.8 there was a change to forms, where you have to pass Fully Qualified Class Names (FQCN) which is the way Symfony 3.0 works.

For that reason I'm considering developing for a minimum of Symfony 2.8 (previously 2.7)

Thoughts?

[Insight] The Symfony Dependency Injection Container should not be passed as an argument - in Extension/UserExtension.php, line 11

in Extension/UserExtension.php, line 11

A Symfony dependency injection container has been found as an argument.

class UserExtension extends \Twig_Extension
{
    private $userManager;

    public function __construct(ContainerInterface $container) {
        $this->userManager = $container->get('hackzilla_ticket.user');
    }

    public function getFilters() {
        return array(

Posted from SensioLabsInsight

Question on extending entity

Hi

First of all tks for a great bundle, we are looking to implement this, however we need to add more fields and want to extend the bundle rather than making changes to the entity class provided with this bundle
Whats the best way to do this, we looked into implementing Single Table inheritance but that means we need to change the entity provided by the bundle and we really dont need to do it this way

Any suggestions?

Cheers
Sameer

Error when Status is invalid

hi, i m Nicolas and i download your package ticket-bundle. I have one probleme with admin( ROLE_TICKET_ADMIN ). When a user is admin i have an error in ticket/ .

An exception has been thrown during the rendering of a template ("Notice: Undefined offset: 0 in C:\wamp\www\ticket\vendor\hackzilla\ticket-bundle\Hackzilla\Bundle\TicketBundle\Entity\Ticket.php line 139") in HackzillaTicketBundle:Ticket:index.html.twig at line 31.

500 Internal Server Error - Twig_Error_Runtime

Limit who can create a ticket

Hi @hackzilla , like I said before...
the more I try your code and the more I think about possible developments :)

I think that should be interesting the ability to limit who can create a ticket because in most situation you don't want that anonymous users can create a ticket.
A possible solution is to add the minimum role name in your bundle config (if empty, anyone can add) or adding a boolean value (allow/disallow anonymous user).

Probably the best solution is to use the role name because is more flexible (for example if you want that only some user can add a ticket).

messages.de.xlf is badly encoded

app/console cac:cle --env=dev
Clearing the cache for the dev environment with debug true

  [Symfony\Component\Translation\Exception\InvalidResourceException]                                                               
  Unable to load "~/ticketapp/vendor/hackzilla/ticket-bundle/Resources/translations/messages.de.xlf": [ERR  
  OR 522] Validation failed: no DTD found ! (in n/a - line 2, column 21)                                                           
  [ERROR 9] Input is not proper UTF-8, indicate encoding !                                                                         
  Bytes: 0xF6 0x66 0x66 0x6E (in n/a - line 9, column 27)                                                                          

  [InvalidArgumentException]                                                  
  [ERROR 522] Validation failed: no DTD found ! (in n/a - line 2, column 21)  
  [ERROR 9] Input is not proper UTF-8, indicate encoding !                    
  Bytes: 0xF6 0x66 0x66 0x6E (in n/a - line 9, column 27)                                                                                               

ROLE_TICKET_ADMIN and inheritance

Hello, I have an issue with your bundle. I have a ROLE_ADMIN as parent of ROLE_TICKET_ADMIN and even I have ROLE_ADMIN, I can't manage tickets.
I saw you are using the method hasRole to check the role, that's why it doesn't handle the inheritance.

It is written in the documentation of FOSUserBundle, next to hasRole method:

 * Never use this to check if this user has access to anything!
 *
 * Use the SecurityContext, or an implementation of AccessDecisionManager
 * instead, e.g.
 *
 *         $securityContext->isGranted('ROLE_USER');

So I guess you have to find an other way to handle it. But I have currently no idea.

Thank you

Open new ticket via email

First, thanks for sharing this bundle!

I would like to know if you are planning / accepting a pull request to add support for creating new tickets via incoming emails. So customers could send an email to [email protected] and a new ticket is opened automatically and answers are sent back to the customers email.

[Insight] Commented code should not be commited - in Command/TicketManagerCommand.php, line 54

in Command/TicketManagerCommand.php, line 54

Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

        $ticketmanager = $this->getContainer()->get('hackzilla_ticket.ticket_manager');

        $ticket = $ticketmanager->createTicket();
        $ticket->setSubject($input->getArgument('subject'));

        //$message = $ticket->getMessages()->current();
        $message = $ticketmanager->createMessage();

        $message->setMessage($input->getArgument('message'))
                ->setStatus(TicketMessage::STATUS_OPEN)
                ->setPriority($input->getOption('priority'))

Posted from SensioLabsInsight

Why PHP 5.5 ?

Hi,

Your bundle is very interesting but i saw the new version 2.x is only for php 5.5.
Why did you lose the compatibility with php 5.3 ? The Symfony LTS (2.8.x) need php 5.3.9, i think it could be interesting to have the same requirements.

Thanks,

Hardcoded prototype template

Despite the fact that we have custom template path for "prototype", this path is hardcoded in show.html.twig at line 69
{% include 'HackzillaTicketBundle:Ticket:prototype.html.twig' with {'form': form} %}

Configuration error

On fresh install of the bundle I got

Call to undefined method Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::arrayNode() in /vendor/hackzilla/ticket-bundle/DependencyInjection/Configuration.php on line 33

Form Submit Error

Ticket

If you try to create a ticket without a message, then form errors are not shown.

Message field and priority field are duplicated.

Message

When you submit an incomplete form priority goes invalid.

ROLE_TICKET_ADMIN

I put in my security
ROLE_ADMIN: ROLE_TICKET_ADMIN
and the admin not show all tickets, only the admin ticket. How i can show all tickets with ROLE_ADMIN?
Thans

[Insight] Unused use statement should be avoided

in Controller/TicketController.php, line 7

The class Symfony\Component\EventDispatcher\EventDispatcher is declared but never used. You should remove the use statement.

namespace Hackzilla\Bundle\TicketBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Hackzilla\Bundle\TicketBundle\Entity\Ticket;
use Hackzilla\Bundle\TicketBundle\Entity\TicketMessage;
use Hackzilla\Bundle\TicketBundle\Form\TicketType;
use Hackzilla\Bundle\TicketBundle\Form\TicketMessageType;
use Hackzilla\Bundle\TicketBundle\TicketEvents;

Posted from SensioLabsInsight

List of closed tickets not working in french

Hi,

I have a problem on the list of closed tickets in french, it seems its not working due to the "é" character in "fermé".

Just received the notice from client so i didn't have a look at a solution yet, but i confirmed the bug by changing the translation term to "ferme" (no "é").

Will check tomorow for a fix

Override form

While I try your fantastic bundle I always think new features;
something that can be very usefull is the ability to override forms, exactly like Model entities (with a setting) https://github.com/hackzilla/TicketBundle/blob/develop/DependencyInjection/Configuration.php#L24 ;

This can be very useful, let's think at this example:
E-commerce:
you to add a ticket for a recent purchase; you can select it from a drop down directly when you add the ticket.

If you want I can write the needed code

[Insight] Project files should not mix end of lines

            Some files contain mixed and/or invalid end of lines ( \r\n instead of \n). Homogenize
            them to improve compatibility across different platforms.
  • Command/AutoClosingCommand.php
    To solve this issue, run the below command:
sed -i "s/\r//g" 'Command/AutoClosingCommand.php'

Posted from SensioLabsInsight

ParameterNotFoundException: hackzilla_ticket.user_bridge.clas

Jast after instalation bundle:

ParameterNotFoundException: The service "hackzilla_ticket.user" has a dependency on a non-existent parameter "hackzilla_ticket.user_bridge.class". Did you mean one of these: "hackzilla_ticket.user_load.class", "hackzilla_ticket.twig_user.class", "hackzilla_ticket.ticket_manager.class"?

vendor/hackzilla/ticket-bundle/Resources/config/services.yml

....
hackzilla_ticket.user:
        class: %hackzilla_ticket.user_bridge.class%
        arguments: ['@service_container']
....

but parameters(in this services.yml):

parameters:
    hackzilla_ticket.user_load.class: Hackzilla\Bundle\TicketBundle\EventListener\UserLoad
    hackzilla_ticket.twig_user.class: Hackzilla\Bundle\TicketBundle\Extension\UserExtension
    hackzilla_ticket.ticket_manager.class: Hackzilla\Bundle\TicketBundle\Manager\TicketManager

services:
....

where is %hackzilla_ticket.user_bridge.class% param?

after this dedective i`m install yours FOSUserBridge

composer require hackzilla/fosuser-bridge-bundle

and add param in vendor/hackzilla/ticket-bundle/Resources/config/services.yml

hackzilla_ticket.user_bridge.class: Hackzilla\Bundle\FOSUserBridgeBundle\User\FOSUser

and all works fine!
Image of Yaktocat

Attachment

Hi @hackzilla
a new interesting (optional) feature can be the ability to attach files to the ticket.

I found two fork of your bundle that have this feature:
https://github.com/coffee-bike/TicketBundle
https://github.com/marcelglaeser/TicketBundle

the second has also some others useful edit (configurable templates, ticket status and priority https://github.com/marcelglaeser/TicketBundle/blob/master/Entity/TicketMessage.php#L88 , ...etc..)

They refers to an old version but I think that they can be adapted easily to your current master branch

Autoclosing of tickets

Hi,

Do you think a ticket autoclosing feature would be a good idea ?
Like for exemple if a ticket is resolved and not closed after 2 weeks would then be automatically closed ? The duration could be a config parameter.

I can try to prepare something and PR it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.