Using Kanban stages and features

The Kanban board is a simple method to manage workflows. It is organized in columns, each corresponding to stages, and the work items progress from left to right until they are finished.

There are a few features used across several Kanban boards, providing a common pattern that can also be used in our own custom modules. Let's visit those features.

Getting ready

To follow this recipe, you will need to have the Project Management app already installed.

How to do it...

To get started with a Project Tasks Kanban board:

  1. Select the Project top menu option and then Create a new Project.
  2. Give a name to the new Project and hit the Save button. Next, press on the Tasks smart button at the top right of the form. This will open the Kanban view for the Project Tasks.
  3. Click on the Add New Column vertical bar at the right, type Now in the small dialog box, and click on Add. Repeat to also add the Later and Done stages.
  4. Hover the mouse pointer over the Done stage and a cog wheel icon will be shown. Click on it and pick Edit from the option menu.
  5. In the Edit Columns window, check the Folded in Tasks Pipeline box and save, as shown in the following screenshot:
    How to do it...

How it works...

Kanban is one of the available view types, and it is able to organize items grouped in columns. If we use stages to group the work items, we get a Kanban board. The stage list can be configured to fit the user's specific needs.

Stages should have a folded attribute, meaning that the corresponding column in the Kanban view should be shown folded. Work in progress items are expected to be in an unfolded stage, and terminated items, usually Done and Cancelled, should be in Folded stages.

Each work item has a reference for the stage it is in. It may also have a Kanban State, represented by a traffic signal-like light, and a Priority, represented by a star. The Kanban cards can also have a color attribute, used for their background color.

While the stage represents the current status in the process for the work item, Kanban State provides information about its readiness to advance to the next stage. It is a Selection field, usually named kanban_state, in the form, and Kanban views is used with the kanban_state_selection widget and expects three possible options:

  • A grey neutral value, the default (the normal database value)
  • A red "Blocked" value (the blocked database value), meaning that there is some reason to retain the work item in the current stage
  • A green "Ready for the next stage" value (the done database value), meaning that the work item is ready to be pulled for the next stage

The Priority is also a Selection field, and is displayed with the special priority widget in the form and Kanban views. The selection options are expected to be either a string with a number, starting at 0, for normal value (not starred), and other values for starred options.

There's more...

Stages are added to models through a Many2one field referencing a stage model defining the possible stages. On form views, they can be represented with the help of the statusbar pipeline widget. For more details on views, widgets, and designing Kanban views, you can refer to Chapter 8, Backend Views.

The complementary Kanban state is supported by a Selection field and its typical definition is:

kanban_state = fields.Selection(
    [('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')],
    'Kanban State',
    default='normal')

On form views, it should use the specific kanban_state_selection widget:

 <field name="kanban_state" widget="kanban_state_selection" />

Regarding the Priority field, it is also a Selection field, and the number of options usually ranges between 2 and 4 selection items:

priority = fields.selection(
    [('0', 'Normal'), ('1', 'Low'), ('2', 'High'), 
     ('3', 'Very High')],
    'Priority', default='0')

In form views, it can make use of the specific priority widget:

<field name="priority" widget="priority"/>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.218.84