Page tree
Skip to end of metadata
Go to start of metadata

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

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.

Bugzilla Menu Button

Example

Here is the macro inserted into a line of text, showing a single bug (Bug 6179 ), and a list of bugs (Bugs 6179 , 6272 , 7030 , 8173 ) to see how it renders.

Display Modes

UsageExampleNotes
Normal active bug (Bug 1192378 )
List of bugs (Bugs 35 , 271437 , 415555 , 706708 )Auto-sorting of unordered list of bugs.
New bug (Bug 688130 )Displays bold
Resolved bug (Bug 8173 )Based on status = "RESOLVED"
Verified bug (Bug 9885 )Based on status = "VERIFIED"
Bug with summary (Bug 6179 : Bad wrapping in saved HTML)Can be toggled from the macro parameter panel without needing to edit the macro
New feature request with summary (Bug 9803 : Background reverts to default color before completing layout)
Stacked display

(Bug 4997 )
(Bug 8117 )
(Bug 8931 )

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

(Bug 35 : Navigator does not free preference hash table when exit.)
(Bug 271437 : Option for Bookmarks Merge on Import)
(Bug 415555 : Feature request: option to AND queries submitted to nsINavHistoryService.executeQueries())
(Bug 706708 : JavaScript Error: this.browser.contentDocument.body is null {file: chrome://browser/content/browser.js line: 1339})

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(†) (Bug 6179987986 )Bad bug displays red; summary shows "No bug found". Only works for a single bug; bad bugs are stripped from a list of bugs.

Note

† " 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

Toggling Summary Display On/Off

Insert menu

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.

Bug List Detailed Report

Bug ID Product Version Status Summary
6179 Core Trunk VERIFIED Bad wrapping in saved HTML
6272 Core Trunk VERIFIED (feature) Insert Table needs to be implemented
7030 Core Trunk VERIFIED Fuzzy rendering when scrollingwith cursor keys
8173 Core Trunk RESOLVED EXPORT - interface methods on "services" - raptorhtml

Bug Listing Showing More Columns

Bug ID Product Version Priority Severity Assignee Status Summary
35 MozillaClassic Graveyard 1998-03-31 P3 minor Chris McAfee VERIFIED Navigator does not free preference hash table when exit.
271437 Firefox Trunk P5 enhancement Nobody; OK to take it and work on it NEW Option for Bookmarks Merge on Import
415555 Firefox unspecified -- enhancement Nobody; OK to take it and work on it RESOLVED Feature request: option to AND queries submitted to nsINavHistoryService.executeQueries()
706708 Firefox for Android unspecified -- normal Nobody; OK to take it and work on it RESOLVED JavaScript Error: "this.browser.contentDocument.body is null" {file: "chrome://browser/content/browser.js" line: 1339}

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 (Bug Search)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.

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:

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 

Note

† 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

Sample Search Results from Mozilla (107 Bugs Found; Results Limited to 25)

Bug ID Product Version Status Summary
1130996 Firefox for Android 38 Branch NEW MP4 broken on Nightly on Alcatel One Touch 8008D
1210164 Firefox for Android unspecified NEW Full-screen video should have touchscreen-friendly controls
1254427 Firefox for Android unspecified NEW [meta] Enable dom/media/test/ mochitests on Android
1258259 Firefox for Android unspecified NEW [Meta]Performance improvement on audio/video playback
1261014 Firefox for Android unspecified NEW [gUM][fennec] Support android.hardware.camera2 interface
1264260 Firefox for Android Trunk NEW Webm videos have no image when opened in new tab on Galaxy S6 Edge device
1264840 Firefox for Android unspecified NEW [Meta] Support EME on Fennec
1267141 Firefox for Android unspecified NEW Enable GMP Clearkey support on Fennec.
1268367 Firefox for Android unspecified NEW [meta] Fennec Audio Controls Enhancement -remote media control and audio competing
1268368 Firefox for Android unspecified NEW [meta] Fennec Media Controls
1268456 Firefox for Android Trunk NEW Investigate shipping the VP9 benchmark sample as downloadable content
1277020 Firefox for Android Trunk NEW Full Screen doesn't re-hide notification bar after temporarily showing it
1287683 Firefox for Android unspecified NEW [Meta] Add Android tests for Fennec media controls and audio focus
1295398 Firefox for Android 51 Branch NEW Media volume control remains active after pushing Firefox to the background
1296090 Firefox for Android unspecified NEW HTML5 video controls' buttons are tiny on html5demos.com (and other sites?)
1296969 Firefox for Android unspecified NEW Seeking on Andrioid shows multiple frames
1297602 Firefox for Android unspecified NEW Start time format is switched when moving the process bar (Video length > 60 mins)
1303656 Firefox for Android 51 Branch NEW Unnecessary white area shows up during rotating phone with full screen video playback.
1304268 Firefox for Android unspecified NEW Permanently record telemetry data for MEDIA_DECODING_PROCESS_CRASH
1307074 Firefox for Android Trunk NEW Switching tabs will stop the HLS player
1307078 Firefox for Android Trunk NEW Interrupting an HLS video with Task manager will lead to incorrect video resume
1308205 Firefox for Android Trunk NEW While in landscape, HLS videos are played in FullScreen
1310899 Firefox for Android 52 Branch NEW HLS VideoView prevents interacting with page, requires back button to close.
1316254 Firefox for Android unspecified NEW Video control should make adjustment to controls' appearance in different video sizes
1317362 Firefox for Android Trunk NEW Autophone - nexus 5 / android 4.4 mochitest dom media failures

Note

Click this link to open this search in Bugzilla: Bug Search

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

Search Results for Keywords: android; Search Type = anywords (4 Bugs Found)

Bug ID Product Component Version Status Summary
719114 Core JavaScript: GC 38 Branch NEW Crash in [@ js::GCMarker::processMarkStackTop ] from heap corruption
760394 Firefox for Android General Trunk NEW android.database.CursorWindowAllocationException: Cursor window allocation of *2048 kb failed. at android.database.CursorWindow.(CursorWindow.java)
1218607 Core Graphics 44 Branch NEW [meta] Firefox on android crashing in [@ libGLESv2_adreno.so@ ...]
1323277 Firefox for Android General unspecified REOPENED Crash in InvalidArrayIndex_CRASH | nsTArray_Impl::ElementAt | mozilla::safebrowsing::HashStore::ReadAddPrefixes

Note

Click this link to open this search in Bugzilla: Bug Search

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.
 Click here to 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.
  • No labels