Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Solution Overview

These macros are implemented in a two-part fashion:

  • A custom plugin to add support for REST calls to the Confluence Velocity context. Data returned from a REST call are stored as Java objects.
  • User macros written in Velocity (delivered as a plugin for convenience).

This is a departure from most plugins were the macros are part of the JAVA code plugin. The two part approach of separating the supporting code from the macros (and UI) offers some distinct advantages:

  • Lessens the complexity of the Java code plugin: no macros. no results formatting
  • User macros are much more easily prototyped (anyone with admin rights can add them to a running Confluence)
  • Much shorter development time
  • Anyone with proper documentation, a knowledge of Velocity, HTML and limited knowledge of Java can create them. These macros will appear in the menus along side all other macros.

This approach allows the end customer to create new custom macros if needed without having to go back to the expert.

Connector Plugin – Server Configuration

The server URL for the Bugzilla server is set by a Confluence admin in the admin consul under the Bugzilla Server tab. The server is set in a two-step process:

  • Enter the base URL with no trailing /, for example, https://bugzilla.mozilla.org
  • Click Test to test the connection.If the connection is successful, the Bugzilla server version is returned.
  • Click Save

This URL is used for all Bugzilla macros site wide.

Available Macros

Table of Contents
maxLevel1
includeBugzilla.*
excludeNotes.*

Bugzilla Bug Link Macro

Purpose

This macro is used to insert a link to a bug or a list of bugs inline.

Features

The Bugzilla Bug Link macro has the following features:

General Features

  • Supports a single bug or a delimited list of bugs. The deliminator can be any mix of non-alphanumeric characters, including double spaces.
  • Can handle a malformed list, for example, will handle the following list "35, 415555 , 706708.. 271437. 415555; 706708".
  • Removes duplicates and sorts the results.
  • Hyperlink that when clicked, opens the bug in another browser tab.
  • Bug ID link is selectively decorated (set via CSS): strikeout for RESOLVED and VERIFIED, bold for NEW.
  • Mouseover text of the link displays a summary of the bug (no need to open the bug to know what it is about).
  • Available from the Insert menu.
  • Also available from a menu button (see figure to the right; menu button next to ?)
  • Stacked display option, either with or without summary display. By default, both of these options are selected.
  • Error message if connection to the Bugzilla server is lost.

Single Bug Features

  • Prefix is either "Bug(s)" for normal bug(s) and can be customized, for example, "RFE" for new feature requests, based on Bugzilla field.
  • Summary display next to the bug can be toggled on an off.

Figure Title
FigNumberBugzilla Menu Button

Bugzilla Menu Button

Image Added

Example

Here is the macro inserted into a line of text, showing a single bug

Bugzilla Bug Link
Id6179
Stackedfalse
SummaryTextfalse
, and a list of bugs
Bugzilla Bug Link
Id6179,7030,8173,6272
Stackedfalse
SummaryTextfalse
to see how it renders.
Table Title
TabNumber1

Display Modes

UsageExampleNotes
Normal active bug
Bugzilla Bug Link
Id1192378
Stackedfalse
SummaryTextfalse
List of bugs
Bugzilla Bug Link
Id35, 415555 , 706708.. 271437. 415555; 706708
Stackedfalse
SummaryTextfalse
Auto-sorting of unordered list of bugs.
New bug
Bugzilla Bug Link
Id688130
Stackedfalse
SummaryTextfalse
Displays bold
Resolved bug
Bugzilla Bug Link
Id8173
Stackedfalse
SummaryTextfalse
Based on status = "RESOLVED"
Verified bug
Bugzilla Bug Link
Id9885
Stackedfalse
SummaryTextfalse
Based on status = "VERIFIED"
Bug with summary
Bugzilla Bug Link
Id6179
SummaryTexttrue
Can be toggled from the macro parameter panel without needing to edit the macro
New feature request with summary
Bugzilla Bug Link
Id9803
SummaryTexttrue
Stacked display

Bugzilla Bug Link
Id8117 4997, 8931
SummaryTextfalse

Vertically stacked; support for RFE versus Bug
Stacked display with summary

Bugzilla Bug Link
Id35, 415555 , 706708.. 271437. 415555; 706708

Displays the results vertically stacked when there are multiple bugs. Always active in summary display is selected and there are multiple bugs
Bad bug number(†)
Bugzilla Bug Link
Id6179987986
Stackedfalse
SummaryTextfalse
Bad bug displays red; summary shows "No bug found". Only works for a single bug; bad bugs are stripped from a list of bugs.
Info
titleNote

† " Bad bug, bad bug. Watcha gonna do when they come for you?"

Use Model

With this current version, there are two methods for inserting the link macro:

  • The link currently is installed as a macro, available on the first-level menu (Insert → Bugzilla Link)
  • Access the type-ahead feature in the editor by typing "{bug" and select the macro.
  • Summary display can be set from the macro property panel (macro does not need to be edited to change). Activated by clicking on the macro.
  • Stacked display can be selected from the macro GUI

Figure Title
FigNumber2

Toggling Summary Display On/Off

Image Added

Figure Title
FigNumber1

Insert menu

Image Added

Bugzilla List Macro

Purpose

Inserts a table displaying details for a delineated list of big numbers

Features

This version of the macro has the following features:

  • Supports a delimited list of bugs with deliminators of any mix of non-alphanumeric characters, including double spaces.
  • Can handle a malformed list, for example, will handle the following list "35, 415555 , 706708.. 271437. 415555; 706708"
  • Removes duplicates and sorts the results
  • Displays the results in a table
  • Some of the column fields can be selectively displayed
  • Hyperlink for the bug that when clicked, opens the bug in another browser tab
  • Bug ID link is selectively decorated (set via CSS): strikeout for RESOLVED, bold for NEW.
  • Customizable table title. Enable by default.

Example

Here are examples of table for bugs pulled from the Bugzilla production server.

Bugzilla Bug List
Id6179,7030,8173,6272 7030;8173

Bugzilla Bug List
Assigned_totrue
Prioritytrue
TitleBug Listing Showing More Columns
Severitytrue
Id35, 415555 , 706708.. 271437. 415555; 706708

Use Model

With this current version, there are two methods for inserting the link macro:

  • The link currently is installed as a macro (Insert → Other Macros → Bugzilla Bug List)
  • Access the type-ahead feature in the editor by typing "{bug" and select the macro.
  • In the GUI, enter a list of bugs, separated by commas
  • Select any additional columns to display

Bugzilla Search Link Macro

This is a simple macro that allows a search URL generated by Bugzilla to be pasted in a page, creating a link that when clicked, opens the results in a new page. This is the same front end to be user by the more complex Bugzilla Filter/Search Macro.

Features

This version of the macro has the following features:

  • Creates a link from a search URL
  • Link opens in a new window when clicked

Example

Here is an example of search results pulled from Mozilla.

UsageExampleNotes
Pasted Search
Bugzilla Bug Search Link
SearchStringhttps://bugzilla.mozilla.org/buglist.cgi?resolution=---&classification=Client%20Software&query_format=advanced&bug_status=ASSIGNED&product=Firefox
Uses the full URL

Use Model

With this current version, there are two methods for inserting the link macro:

  • The link currently is installed as a macro (Insert → Other Macros → Bugzilla Search Link )
  • Access the type-ahead feature in the editor by typing "{bug" and select the macro.
  • Go to Bugzilla and perform the desired search; copy the resulting URL.
  • In the GUI, past the search URL in the URL field
  • Click Save.

Image Added

Figure Title
FigNumber1

Bugzilla Bug Search Link Macro GUI

Bugzilla Filter/Search Macro

This macro allows a user to enter a set of search/filter terms and retrieve the display in a table similar to Bugzilla List Macro.

Features

This version of the macro has the following features:

  • Creates the search results from a pasted search performed earlier in Bugzilla
  • Display the returned results in a table (with a cut off to the length)
    • The fields used in the table as columns are selectable in the UI (there is a min required set of columns)
    • Notification at the end of the table that the results are truncated
    • Link that will open the search results in Bugzilla at the end of the table
    • Ability to limit the number of results that are displayed. Default value is 100; a setting of 0 means no limit (in reality, there is an overflow limit of 500)
    • Number of bugs returned (plus a notice of any limit) is appended to the title; for example, "(55 Bugs Found; Results Limited to 25)"
    • P1 rows are highlighted in red
  • Customizable table title. Enabled by default.
  • Error message if connection to the Bugzilla server is lost.

Possible Table Columns/Fields

User can select from the this set of fields to appear as columns in the results table. Fields marked as default are always displayed:

Table Title

Supported Report Table Columns

FieldTable
Heading(†)
Default(‡)Currently
Implemented
Comments
assigneeAssignee X 
bug_idBug IDXX 
componentComponent X 
creation_timeCreation Time X 
keywordsKeywords X 
last_change_timeLast Changed X 
milestoneTarget Milestone X 
op_sysOS X 
platform (for Hardware)Platform X 
priorityPriority X 
productProductXX 
qa_contactQA Contact X 
reporterReporter X 
resolutionResolution X 
severitySeverity X 
statusStatusXX 
summarySummaryXX 
urlURL XFormats as plain text, weblink (shows "link") or Confluence link (attachments display the file name, or page ID only display ID)
whiteboardWhiteboard X 
Info
titleNote

† This name will match that in a bug listing where applicable.

‡ Selectable but enabled by default.

Selectable Search Fields

All of the above fields are currently implemented.

Example

BugZilla Search Table Macro
TitleSample Search Results from Mozilla
Limit25
SearchStringhttps://bugzilla.mozilla.org/buglist.cgi?resolution=---&classification=Client%20Software&query_format=advanced&bug_status=NEW&component=Audio%2FVideo&product=Firefox%20for%20Android

Use Model

With this current version, there are two methods for inserting the link macro:

  • The link currently is installed as a macro (Insert → Other Macros → Bugzilla Search Table Macro)
  • Access the type-ahead feature in the editor by typing "{bug" and select the macro.
  • Go to Bugzilla and perform the desired search; copy the resulting URL.
  • In the GUI, past the search URL in the URL field.
  • Click Save.

Bugzilla Keyword Search Macro

This macro allows a user to enter a set of search/filter terms and retrieve the display in a table similar to Bugzilla Filter/Search Macro

Features

This version of the macro has the following features:

  • Supports a delimited list of keyword with deliminators of any mix of non-alphanumeric characters, including double spaces.
  • Supports three Boolean searches, any words, all words, RegEx
  • Display the returned results in a table (with a cut off to the length)
    • The fields used in the table as columns are selectable in the UI (there is a min required set of columns)
    • Notification at the end of the table that the results are truncated
    • Link that will open the search results in Bugzilla at the end of the table
    • Ability to limit the number of results that are displayed. Default value is 100; a setting of 0 means no limit (in reality, there is an overflow limit of 500)
    • Number of bugs returned (plus a notice of any limit) is appended to the title; for example, "(55 Bugs Found; Results Limited to 25)"
    • P1 rows are highlighted in red
  • Customizable table title; default table title of the "Search Results for Keywords: <keyword(s)>; Search Type = <search_type>. Selectable, but enabled by default.
  • Error message if connection to the Bugzilla server is lost.
  • Version 1.0.75 reduces the amount of REST data called by about 95%

Possible Table Columns/Fields

User can select from the this set of fields to appear as columns in the results table. Fields are identical with Bugzilla Filter/Search Macro

Selectable Search Fields

All fields are currently implemented.

Example

BugZilla Keyword Search Table Macro
KeyWordandroid
Limit10
Componenttrue

Use Model

With this current version, there are two methods for inserting the link macro:

  • The link currently is installed as a macro (Insert → Other Macros → Bugzilla Keyword Search Table Macro)
  • Access the type-ahead feature in the editor by typing "{bug" and select the macro.
  • Enter one or more keywords, separated with spaces or punctuation.
  • Select the search type.
  • Enter a table title if desired. Selectable, but enabled by default.
  • Change the results limit if desired
  • Click Save.
Expand

Release History

ReleaseItem
1.0.75Reduces the amount of REST data called by about 95% for the Bugzilla Keyword Search Macro
1.0.76Add the regression column to all table macros.
1.0.77Changed the Bug Link Macro so that the stacked display option and summary are selected by default
1.0.78Added a button to the editor ribbon for inserting a bug link.
1.0.79Fixed an issue with the Bugzilla List Macro where the product column was not displaying when selected.
1.0.80Added support for new fields Test Plan, Test Link and Script RFE to all table macros.
1.0.81Developmental release.
1.0.82
  • Added support for URL field to all table macros.
  • Set formatting for Test Plan and URL to show plain text, weblink (shows "link") or Confluence link depending on source.
  • Set formatting for Script RFE to active bug link. When clicked, opens bug in new window.
  • Added ability to custom format tables with CSS. Currently heading cells set to center, middle alignment.
1.0.83
  • Added additional formatting options for URLs: confluence attachments render with the file name only, page names with URL reserved characters in the page name render with just page ID#.
  • Added support for the OS field in table macros.