wiki:TicketBoxMacro

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: The 'query' format is not yet supported, see TicketQuery.

Bugs/Feature Requests

Existing bugs and feature requests for TicketBoxMacro are here.

If you have any issues, create a new ticket.

defect

15 / 19

enhancement

7 / 11

task

0 / 1

Download

Download the zipped source from here.

Source

You can check out TicketBoxMacro from here using Subversion, or browse the source with Trac.

Installation

Copy TicketBox.py to plugins directory of your Trac environment, and there is no need enable this plugin explicitly.

Alternatively, copy it to system wide plugins directory, then enable the TicketBox plugin via the admin page.

Usage

Examples

This example shows the simple list of tickets by specifying ticket numbers. The '#' character can be omitted:

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

These examples list the tickets from the report result. The third example uses the dynamic variable 'COMPONENT'. The special variable 'USER' is always available and it is your login name, or 'anonymous' if not logged in. You can override the variable 'USER' like in the fourth example.

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

If field name of ticket id is not 'ticket' in report report definition, you can specify it by ticket=xxx:

[[Ticketbox({20}, ticket=id)]]

TracQuery style of query string can be used. And it can also be used in report definition, starting with query::

[[TicketBox([query:status=new])]]

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

[[TicketBox({1}, #50, {2}, [query:keywords~=important], 100)]]

If nosort option is specified, then the tickets are listed without sorting:

[[TicketBox(3, 2, 1, {1}, nosort)]]

Display Options

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 a single quote (') or a double quote ("). You can also embed the number of tickets by '%d' in title string like in the third example:

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

If you do not want the box to be floating, use the inline keyword. The box is placed inline with the wiki text. If you want the ticket's summary to be displayed, use the summary keyword:

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

The option nowrap forces the line not to wrap around the screen. It is useful with the summary option. If this option is specified, line length may exceeds specified width:

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

Text color, background color, border line color and float position can be specified:

[[TicketBox({1}, float=left, color=green, background=transparent, border-color=red)]]

Recent Changes

16985 by rjollos on 2017-11-18 10:25:26
Add metadata
7516 by gotoh on 2010-02-09 01: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 07:24:14
Fix to work with trac 0.12dev.
(more)

Author/Contributors

Author: gotoh
Maintainer: Shun-ichi Goto
Contributors:

Last modified 2 years ago Last modified on Feb 17, 2022, 7:55:46 AM