# ticket

type: defect
component: component1
priority: critical
owner: somebody
reporter: vcizek
status: new
summary: off-by-one error in tx_colorwin
description:
  Not big enough buffer is allocated for blankpad
  in tx_colorwin which causes program termination.

  Corresponding bug in suse bugzilla:
  https://bugzilla.novell.com/show_bug.cgi?id=711726


type: enhancement
component: component1
priority: minor
owner: somebody
reporter: dspruell
status: new
summary: Support changing log storage directory in daemon mode
description:
  It would be useful in cases to be able to specify an alternate output directory for writing logs when running iptraf-ng in daemon mode. Current logging configuration supports specifying alternate log file name but this kills ability to preserve the nice automatic log names the program uses and simply write them elsewhere.


type: enhancement
component: component1
priority: major
owner: somebody
reporter: oibaf
cc: pedretti.fabio@gmail.com
status: new
summary: Sort interfaces, including VLAN interfaces
description:
  It would be nice if interfaces are sorted, in my setup VLAN interfaces are not properly sorted. See screenshot:


# ticket_change

author: oibaf
field: comment
oldvalue: 1
newvalue:
  In this screenshot only regular (without a VLAN) interfaces seems to be sorted.

  I am using iptraf-ng 1.1.3.1-2~bpo70+1 from debian, same problem with 1.1.4 compiled from source.

  [[Image(https://fedorahosted.org/iptraf-ng/raw-attachment/ticket/3/iptraf.png)]]


author: oibaf
field: _comment0
newvalue: 1431446297151460
oldvalue:
  In this screenshot only regular (without a VLAN) interfaces seems to be sorted.

  I am using iptraf-ng 1.1.3.1-2~bpo70+1 from debian.

  [[Image(https://fedorahosted.org/iptraf-ng/raw-attachment/ticket/3/iptraf.png)]]


# report

title: Active Tickets
description:
  * List all active tickets by priority.
  * Color each row based on priority.

query:
  SELECT p.value AS __color__,
     id AS ticket, summary, component, version, milestone, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed' 
    ORDER BY p.value, milestone, t.type, time


title: Active Tickets by Version
query:
  SELECT p.value AS __color__,
     version AS __group__,
     id AS ticket, summary, component, version, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed' 
    ORDER BY (version IS NULL),version, p.value, t.type, time

description:
  This report shows how to color results by priority,
  while grouping results by version.

  Last modification time, description and reporter are included as hidden fields
  for useful RSS export.


title: Active Tickets by Milestone
query:
  SELECT p.value AS __color__,
     milestone||' Release' AS __group__,
     id AS ticket, summary, component, version, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed' 
    ORDER BY (milestone IS NULL),milestone, p.value, t.type, time

description:
  This report shows how to color results by priority,
  while grouping results by milestone.

  Last modification time, description and reporter are included as hidden fields
  for useful RSS export.


title: Assigned, Active Tickets by Owner
description: List assigned tickets, group by ticket owner, sorted by priority.
query:
  SELECT p.value AS __color__,
     owner AS __group__,
     id AS ticket, summary, component, milestone, t.type AS type, time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status = 'assigned'
    ORDER BY owner, p.value, t.type, time


title: Assigned, Active Tickets by Owner (Full Description)
query:
  SELECT p.value AS __color__,
     owner AS __group__,
     id AS ticket, summary, component, milestone, t.type AS type, time AS created,
     description AS _description_,
     changetime AS _changetime, reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status = 'assigned'
    ORDER BY owner, p.value, t.type, time

description:
  List tickets assigned, group by ticket owner.
  This report demonstrates the use of full-row display.


title: All Tickets By Milestone (Including closed)
description: A more complex example to show how to make advanced reports.
query:
  SELECT p.value AS __color__,
     t.milestone AS __group__,
     (CASE status 
        WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;'
        ELSE 
          (CASE owner WHEN $USER THEN 'font-weight: bold' END)
      END) AS __style__,
     id AS ticket, summary, component, status, 
     resolution,version, t.type AS type, priority, owner,
     changetime AS modified,
     time AS _time,reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    ORDER BY (milestone IS NULL), milestone DESC, (status = 'closed'), 
          (CASE status WHEN 'closed' THEN modified ELSE (-1)*p.value END) DESC


title: My Tickets
query:
  SELECT p.value AS __color__,
     (CASE status WHEN 'assigned' THEN 'Assigned' ELSE 'Owned' END) AS __group__,
     id AS ticket, summary, component, version, milestone,
     t.type AS type, priority, time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE t.status <> 'closed' AND owner = $USER
    ORDER BY (status = 'assigned') DESC, p.value, milestone, t.type, time

description:
  This report demonstrates the use of the automatically set 
  USER dynamic variable, replaced with the username of the
  logged in user when executed.


title: Active Tickets, Mine first
query:
  SELECT p.value AS __color__,
     (CASE owner 
       WHEN $USER THEN 'My Tickets' 
       ELSE 'Active Tickets' 
      END) AS __group__,
     id AS ticket, summary, component, version, milestone, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed' 
    ORDER BY (owner = $USER) DESC, p.value, milestone, t.type, time

description:
   * List all active tickets by priority.
   * Show all tickets owned by the logged in user in a group first.


