WebIssues/Views and Filters

From MiMec
Jump to: navigation, search


Views will be introduced in version 1.0-alpha2. They will extend the idea of filters from version 0.x with the following improvements:

  • views will be stored on the server
  • server administrators will be able to create public views available for all users
  • it will be possible to define a different set of columns for each filter

Each issue type will have its own separate set of views. There will be public views and personal views for each user.

Functional Specification

The basic operations on views are:

  • list all personal and public views for each issue type
  • add a new view
  • rename a view
  • publish/unpublish a view (i.e. make it public/personal)
  • modify the view definition (columns, sort order and filter)
  • delete a view

Only server administrators can add, modify and remove public views. All users will be allowed to add, modify and remove their own personal views.

The current view can be selected using a combo box just like filters worked in version 0.x. The combo box will show all personal and public views for the particular issue type.

There will be no concept similar to the 'unnamed filer' in version 0.x. In order to change columns settings or filter the list the user has to either create a new view or to modify the current view. Note that changing the sorting order in the list does not modify the view (the next time the view is selected the default order is used again).

In addition there will be a built-in view called 'All Issues', separately for each issue type. This view cannot be removed, renamed or unpublished and it cannot have any filter conditions. This view is always used by default for each folder (unless a specific watch is selected in the project tree or the view is changed using the combo box).

Only server adminstrators will be allowed to change the order of attributes (used when displaying/editing issue details) and to modify the built-in default view. These information will be stored in a separate table and managed using separate commands, although the UI will be similar.

A prototype of the user interface is available at http://doc.mimec.org/prototypes/views/index.html.

Technical Specification

Database tables used for storing view settings for each type and view definitions:

view_settings ( type_id, set_key, set_value )
views ( view_id, type_id, user_id, view_name, view_def )

The desktop client will use a simple map to store view settings and a regular RDB table to store views.

Available filter operands:

  • always (empty operand is allowed)
    • is equal to
    • is not equal to
  • numbers and dates (date always given without time part)
    • is greater than
    • is less than
    • is greater than or equal to
    • is less than or equal to
  • text, enum, user
    • contains
    • begins with
    • ends with

Note that the same column can be included more than once in the filter to make it possible to make conditions like Created Date >= 2010-01-01 AND Created Date <= 2010-12-31.

Special expressions:

  • [Me] (name of the current user)
  • [Today] (current date)
  • [Today]+1, [Today]-7 (specified number of days from current date)

These expressions will replace the older than, newer than, is me and is not me operands from version 0.x.

Format of view definition:

  • VIEW columns="1,2,3" sort-column=1 sort-desc=1 filters={"EQ column=1 operand=\"Active\"","CONT column=2 operand=\"1.0\""}
  • Each filter condition itself is a definition string

Format of view settings:

  • attribute_order: "1,2,3"
  • default_view: "VIEW …" (without filters)