2017 © Pedro Peláez
 

library task-tracker-bundle

Task tracker

image

sokil/task-tracker-bundle

Task tracker

  • Wednesday, July 5, 2017
  • by sokil
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

TaskStockBundle

Total Downloads Daily Downloads, (*1)

Task tracker bundle, (*2)

Installation

Add dependency to composer:, (*3)

composer.phar reequire sokil/task-stock-bundle

Configuration

This bundle depends from other bundles, which also require configuration. If you yet not using it, configure them: * FrontendBundle * FileStorageBundle * NotificationBundle * UserBundle, (*4)

Basic bundle configuration

1) Add bundle to AppKernel:, (*5)

<?php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Sokil\TaskStockBundle\TaskStockBundle(),
        );
    }
}

2) Define required parameters in ./app/config/parameters.yml.dist:, (*6)

# email server parameters
notification.from_email.address: ~
notification.from_email.sender_name: ~

3) Add roles to role hierarchy in file ./app/config/security.yml:, (*7)

security:
    role_hierarchy:
        ROLE_TASK_VIEWER:           [ROLE_USER]
        ROLE_TASK_MANAGER:          [ROLE_TASK_VIEWER]
        ROLE_TASK_PROJECT_VIEWER:   [ROLE_USER]
        ROLE_TASK_PROJECT_MANAGER:  [ROLE_TASK_PROJECT_VIEWER]

4) Register routing in ./app/console/routing.yml:, (*8)

task_stock:
    resource: "@TaskStockBundle/Resources/config/routing.yml"

5) Bundle uses assetic so you need to register it in assetic config and do some configuration:, (*9)

assetic:
    bundles:
        - TaskStockBundle
    variables:
        locale: [uk, en, de. fr]
        env: [dev,prod]

Paramater varailbes passes some valiables to assets, tham will be used to build path to assets., (*10)

Configuring SPA

This bundle uses FrontendBundle for building frontend, so configure SPA, and add some dependencies to it:, (*11)

{% import "@FrontendBundle/Resources/views/macro.html.twig" as frontend %}
{% import "@TaskStockBundle/Resources/views/Spa/macro.html.twig" as taskSpa %}

{{ frontend.commonCssResources() }}
{{ frontend.commonJsResources() }}
{{ frontend.spaJsResources() }}

{{ taskSpa.cssResources() }}
{{ taskSpa.jsResources() }}






Configuring file storage

This bundle uses FileStorageBundle to handle file uploads., (*12)

You need to configure some filesystem to handle uploads, for example task_stock.attachments. Add to your ./app/config/config.yml:, (*13)

knp_gaufrette:
    factories:
        - "%kernel.root_dir%/../vendor/sokil/file-storage-bundle/src/Resources/config/adapter_factories.xml"
    adapters:
        task_stock.attachments:
            internal:
                pathStrategy:
                    name: chunkpath
                    options:
                        chunksNumber: 2
                        chunkSize: 3
                        preserveExtension: false
                        baseDir: "%kernel.root_dir%/files/task_attach"
    filesystems:
        task_stock.attachments:
            adapter: task_stock.attachments

Then add this filesystem to bundle's config at ./app/config/config.yml:, (*14)

task_stock:
   attachments_filesystem: "task_stock.attachments"

Configuring task states

Task belongs to some category: Bug, Enhancement, Feature, Design, etc. Different categories of tasks may have different state flows. Bug may have states New, In Progres, Test, Resolved, and Design may have states New, Prototyping, Drawing, Markup, Resolved. This groups of states called Schema. Task with category Design may be related to Drawing schema, and tasks Bug, Feature may be relared to Development schema., (*15)

Add schema configuration to your ./app/config/config.yaml:, (*16)

taskStock:
   stateConfig:
      - id: 0
        name: Development
        states:
          new:
            label: task_status_new
            initial: true
            transitions:
              to_in_progress:
                resultingState: in_progress
                label: task_transiotion_open
                icon: glyphicon glyphicon-play
              to_rejected:
                resultingState: rejected
                label: task_transiotion_reject
                icon: glyphicon glyphicon-ban-circle
          in_progress:
            label: task_status_in_progress
            transitions:
              to_resolved:
                resultingState: resolved
                   label: task_transiotion_resolve
                   icon: glyphicon glyphicon-ok
                 to_rejected:
                   resultingState: rejected
                   label: task_transiotion_reject
                   icon: glyphicon glyphicon-ban-circle
             rejected:
               label: task_status_rejected
               transitions:
                 to_in_progress:
                   resultingState: in_progress
                   label: task_transiotion_reopen
                   icon: glyphicon glyphicon-repeat
             resolved:
               label: task_status_resolved
               transitions:
                 to_in_progress:
                   resultingState: in_progress
                   label: task_transiotion_reopen
                   icon: glyphicon glyphicon-repeat

The Versions