wiki:TicketBoxMacro

Version 15 (modified by soloturn, 6 years ago) (diff)

adjust versions and tags

Ticket list in a box on the wiki page

Description

This macro displays the list of ticket numbers in a box on the right side of the page compactly. You can specify the tickets explicitly or use the result of reporting. The tickets will be displayed as sorted and uniq'ed. An example image is shown on the right of this page.

Note: 'query' format is not yet supported.

Bugs/Feature Requests

Existing bugs and feature requests for TicketBoxMacro are here.

If you have any issues, create a new ticket.

Download and Source

(2008/03/28 : TicketBoxMacro for 0.8 is obsoleted.)

Install

For trac 0.10 or before, copy TicketBox.py to wiki-macros directory of your trac environment or system wide wiki-macros directory.

For trac 0.11, copy TicketBox.py to plugins directory of your trac environment (no need enable this plugin explicitly). Or copy it to system wide plugins directory then enable the TicketBox plugin via admin page.

Example

These example shows the simple list of tickets by specifiying ticket numbers. '#' character can be omitted:

[[TicketBox(#1,#7,#31)]]
[[TicketBox(1,7,31)]]

These examples lists the tickets from the report result. Second examplesh uses dynamic variable 'COMPONENT'. The special variable 'USER' is always avaiable and it is your login name (or 'anonymous' if not logged in). You can override the variable 'USER' like third example.

[[TicketBox({1})]]
[[TicketBox([report:1])]]
[[TicketBox([report:9?COMPONENT=TicketBox])]]
[[TicketBox([report:9?USER=foo])]]

The combination of above is allowed. The tickets are listed as sorted and uniq'ed:

[[TicketBox({1},#50,{2},100)]]

You can specify the size of the box:

[[TicketBox(500pt,{1})]]
[[TicketBox(200px,{1})]]
[[TicketBox(25%,{1})]]

You can specify the title. The value should be surrounded by single or double quote. You can also embed the number of tickets by '%d' in title string like third example:

[[TicketBox('Related Tickets',#1,#2)]]
[[TicketBox("Related Tickets",#1,#2)]]
[[TicketBox("There are %d tickets",{1})]]

If you do not make box floating, put the 'inline' argument. The box is placed in the text. If you want to show with summary string, put 'summary' argument:

[[TicketBox({1},inline)]]
[[TicketBox({1},summary,inline)]]

Author/Contributors

Author: gotoh
Contributors:

TagIt(macro,gotoh,example,0.9,0.10,0.11)?

[7516] by gotoh on 2010-02-09 02:38:57
Set documentation string of macro.
Now you can see macro description in WikiMacros page.
close #6591.
[7508] by gotoh on 2010-02-08 08:24:14
Fix to work with trac 0.12dev.
[7507] by gotoh on 2010-02-08 07:42:07
Correct plugin info introduced in last commit r7506. (#6562)
Also use the page on TracHacks as home page URL.
[7506] by gotoh on 2010-02-08 03:52:32
Add plugin module info supported by Trac 0.12.
close #6562.
[5658] by gotoh on 2009-05-05 08:54:28
Add new directive 'inline_total' to make simple total number text inline.
This feature is a sub request in #1929.