Tags:
create new tag
, view all tags

BugzillaLinkPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on BugzillaLinkPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Discussions around BugzillaLinkPlugin

I renamed the Plugin from BugzillaPlugin to BugzillaLinkPlugin because this is more accurate, and also because someone might create a real Plugin someday that has the Bugzilla functionality. Florian, would you mind to repackage the Plugin with the new name?

Note that you get a similar behaviour if you add a new site to the InterwikiPlugin. That way you would write Bug:123 to link to the Bugzilla database.

-- PeterThoeny - 16 Aug 2002

I repackaged and uploaded BugzillaListPlugin1.1.tar.gz as BugzillaLinkPlugin.zip to (1) match the WikiName, and (2) drop the top-level BugzillaListPlugin1.1/ directory so that it conforms to the style of other .zip packages here, i.e., it can be unzip'd in the TWiki root directory. (Assuming it looks ok, the attachments in BugzillaLinkPlugin can be archived.)

-- AnthonPang - 22 Dec 2002

Love your Bugzilla link plugin. Works very well.

Have an enhancement for you. This fixes a possible problem when you have a space in a bug or milestone (the s/// bit in there).

Also, you might note that I've changed the target_milestone request. Our Bugzilla installation (2.6.13) really didn't like the old one, and it seems to be quite happy with this one. Go figure.

sub BugzillaShowBug{
   my ($bugID) = @_;
   ## display a bug img and the bugzilla url
   $bugID =~ s/\s*(\S*)\s*/$1/;
   return "$bugImgUrl [[$bugUrl$bugID][$bugText$bugID]]";
}

sub BugzillaShowMilestoneBugList{
   my ($mID) = @_;
   ## display a bug img and a bugzilla milesteone bug list
   $mID =~ s/\s*(\S*)\s*/$1/;
   return "$bugImgUrl [[$milestoneBugListUrl"."target_milestone=".$mID."][$milestoneBugListText $mID]]";
}

Further, the link you use to the bug graphic might best be changed to

<img 
src="%PUBURL%/%TWIKIWEB%/BugzillaLinkPlugin/bug_small.gif" border="0" 
alt="HELP" width="12" height="12" />

I have also created a png version of your graphic which is a bit smaller, has a transparent background, and isn't patent encumbered if you care about such things. I have enclosed a second version with a white background in case of wonkyness with older browsers and transparency.

Thanks again for this great plugin,

-- AlanShields - 01 May 2003

I've attached the body of Alan's email (above) and image files (below). Further comments welcome.

I think trimming leading and trailing spaces is a good idea -- it helps where users aren't habituated to omitting unnecessary whitespace.

As for BUGIMGURL, I honestly don't have a preference -- both work, right? The difference is that ATTACHURL is implicit (i.e., the path is dependent on the topic name), while your recommendation is more explicit.

I myself haven't used the milestone ID, and am still using 2.16.2. (Bugzilla 2.16.3 was released last week.)

-- AnthonPang - 02 May 2003

Version 1.2

Thank you guys for your input - I didn't realize that someone else is acutally using this stuff wink

In the meantime I got a patch from Steve Kostecke that introduces a shorthand to the mybugs feature. So I decided to put this and the changes from Alan Shields together and pack everything to a version 1.2.

New features:

  • My-Bugs shortcut
  • White-space handling in bugs
  • New packaging (ZIP with no root directory)

Download it from the BugzillaLinkPlugin page and have fun....

-- FlorianGnaegi - 08 Jul 2003


I just upgraded our in-house TWiki and picked this plugin to experiment with. It's very khoul, but the BUGIMGURL is set wrong and the bug images are put into the wrong place. As shipped it is set to % ATTACHURLPATH%/bug_small.gif, which means that when you try to use the tags in a page other than the TWiki.BugzillaLinkPlugin page they'll not resolve. I copied the gifs into /var/twiki/pub, then set the BUGURL to % PUBURLPATH%/bug_small.gif to get around this problem. If that's the correct solution, you probably want to change the latest .zip file to reflect this.

Also there appears to be a typo in the last attachment, which as shipped is "bug_small_whilte.gif". I think you meant "bug_small_white.gif here.

Other than tose minor glitches, it works great and is less filling. Tocks a meka..

-- CharlesShapiro - 14 Jul 2003

i also had the problem with the bug image graphic. i really like attaching the graphic to the same page as the plugin; here's how i setup mine:

    • Set BUGIMGURL = %PUBURL%/TWiki/BugzillaLinkPlugin/bug_small.gif

-- WillNorris - 21 Jul 2003

I believe using variable-notation %BUG{\d+}% is overkill.

According to the bugzilla site, here are the types of things that bugzilla automagically link-ifies in it's own system:

bug 12345 
bug 23456, comment 53 
attachment 4321 
mailto:george@example.com 
george@example.com 
ftp://ftp.mozilla.org 
Most other sorts of URL 

Perhaps this plugin should allow the option of using automagic linkification. That is, people just type "bug 123" and it's turned into a link, instead of having to type %BUG{123}% and similarly for the other link types.

You know, something like s/\b([bug|attachment|comment])\s(\d{3,7})\b/...../gi

disclaimer: I haven't installed this plugin (yet). I have written an autolinker for DDTS, but that was relatively easy, because DDTS bugs always have a funny identifier in front (example: DEVpr2712), at least with the DDTS I've been using.

-- JonathanCline - 12 Aug 2003

Could the plugin be extended to allow prefixes that determine different Bugzilla servers; no prefix would default to a default bug url, whereas, for example %BUG{apache:22521}% might go to Bugzilla on http://issues.apache.org.

The plugin would be configured in a similar way to the InterwikiPlugin.

Useful when caveating bugs in 3rd party software...

-- EllisPritchard - 21 Aug 2003

I am very interested in this autolinker facility for DDTS. Could someone elaborate more on how this could be implemented ?

-- JanMertens - 26 Nov 2003

In BugzillaPlugin1.0 you will get wrong parsing when you type something like this: "first bug %BUG{1}% second bug %BUG{2}%". Good parsing require this change in source:

bolek:/tmp/lib/TWiki/Plugins> diff -u BugzillaPlugin.pm.orig BugzillaPlugin.pm 
--- BugzillaPlugin.pm.orig      2004-06-13 16:01:00.000000000 +0200
+++ BugzillaPlugin.pm   2004-06-13 16:01:17.000000000 +0200
@@ -86,7 +86,7 @@
 
     # This is the place to define customized tags and variables
     # Called by sub handleCommonTags, after %INCLUDE:"..."%
-    $_[0] =~ s/%BUG\{(.+)\}%/&BugzillaShowBug($1)/geo;
+    $_[0] =~ s/%BUG\{(.*?)\}%/&BugzillaShowBug($1)/geo;
 }
-- KonradLudwikowski - 13 Jun 2004

checked .zip into CVSplugins:BugzillaLinkPlugin

-- WillNorris - 23 Nov 2004

nice, thanks! I've a small addition, not sure if it is strong enough, but it come very handy if your users keep their email info up to date on their user page. you write %MYBUGS% and you get the list of bugs relative to the email address of the logged in wiki user.

--- /home/mario/BugzillaLinkPlugin.pm   2005-02-25 13:44:10.890673552 +0100
+++ /home/intrafici/public_html/twiki/lib/TWiki/Plugins/BugzillaLinkPlugin.pm  2005-02-25 13:31:59.572850760 +0100
@@ -91,6 +91,7 @@
     # Called by sub handleCommonTags, after %INCLUDE:"..."%
     $_[0] =~ s/%BUG\{([0-9]+)\}%/&BugzillaShowBug($1)/geo;
     $_[0] =~ s/%BUGLIST\{(.+)\}%/&BugzillaShowMilestoneBugList($1)/geo;
+    $_[0] =~ s/%MYBUGS%/&BugzillaShowMyBugList(&TWiki::getEmailOfUser($TWiki::userName))/geo;
     $_[0] =~ s/%MYBUGS\{(.+)\}%/&BugzillaShowMyBugList($1)/geo;
 }
-- MarioFrasca - 25 Feb 2005

Submitted for approval: v1.300 of the BugzillaLinkPlugin, now fixed for Dakar, a new keyword search (choice of OR- or AND-search), reformatted documentation and refactored PluginSettings. What say you folks?

-- JoanTouzet - 03 Oct 2005

V1.300 works great for me on TWiki version Sun, 06 Nov 2005 build 7330, Plugin API version 1.1

But only after I had remembered I had to go to the configure interface to enable the Plugin - doh!

-- GavinShelley - 03 Jan 2006

TWiki 4.0.1 Upgrade Issues

When I upgraded to TWiki 4.0.1 yesterday this plugin would cause 500 errors on any page request:

[Thu Feb 16 13:08:28 2006] [error] [client 172.28.57.145] Can't use string ("BUG
ZILLALINKPLUGIN_BUGURL") as a HASH ref while "strict refs" in use at /dvt/shared
/betatwiki/lib/TWiki/Prefs.pm line 218., referer: http://betatwiki.tm.tmcs/twiki
/bin/edit/TWiki/BugzillaLinkPlugin?t=1140124035

Changing the getPreferencesValue subroutine

  • from: &TWiki::Prefs::getPreferencesValue
  • to: TWiki::Func::getPreferencesValue

..fixed the problem.

-- RickOliver - 17 Feb 2006

To the Plugin maintainer: This Plugin does not work in TWiki 4.0. Please consider upgrading this Plugin so that it runs on Cairo and Dakar codebase. HandlingCairoDakarPluginDifferences has more.

-- PeterThoeny - 17 Feb 2006

I'd like to see this plugin be upgraded too. And would it be a good idea to (also?) install the .gif files so we could use %ICON{"bug"}% ?

-- HarlanStenn - 16 May 2008

New version for twiki 4.2 released. Have fun.

-- SaschaVetter - 26 Aug 2008

I'm having trouble with the BUGIMGURL. The bug image shows up as the text "bug_small.png" instead of the image. The image shows up on the BugzillaLinkPlugin page. Here's how I have TWikiPreferences set up: <!-- Add site-wide preferences here -->

Am I missing something? I'm a bit of a TWiki newbie, so the configuration info on this plugin seemed to assume a lot of configuration knowledge. A few more words would be useful to those who don't do this every day.

Thanks for the great plugin! I'm sure the image issue can be sorted out.

-- SteveKelem - 2011-03-16

I looked at the generated html for the BUGIMGURL defined as:

    • Set BUGIMGURL = <img src="http://myhost.net/twiki/pub/TWiki/BugzillaLinkPlugin/bug_small.png" border="0" alt="HELP" width="12" height="12" />
This yields: <img alt="bug_small.png" src="http://myhost.net/twiki/pub/Status/StatusWeekly/bug_small.png" /> Which doesn't exist. bug.small.png is in http ://myhost.net/twiki/pub/TWiki/BugzillaLinkPlugin/bug_small.png, and is displayed properly on my BugzillaLinkPlugin page.

-- SteveKelem - 2011-03-17

I also tried:

  • Set BUGIMGURL = %PUBURL%/%TWIKIWEB%/BugzillaLinkPlugin/bug_small.gif
which didn't work, but, based on the generated html code, it's looking for bug_small.gif as an attachment to the current page instead of where BUGIMGURL is pointing. The definition inside lib/TWiki/Plugins/BugzillaLinkPlugin.pm says: $bugImgUrl = &TWiki::Func::getPreferencesValue( "BUGZILLALINKPLUGIN_BUGIMGURL" ) || "%TWIKIWEB%/BugzillaLinkPlugin/bug.gif"; so I tried removing the line from Main/TWikiPreferences so the default location would be used, but it's not. It still creates an html img link that references the current page instead of the bug_small.gif on the ATTACHURL/BugzillaLink.

-- SteveKelem - 2011-03-19

%BUGTEXT{####}% substitutes the literal text "Bug #". IMO it would be more useful to substitute the bug title. -- SteveKelem - 2011-12-12

-- SteveKelem - 2011-12-12

Sorry I'm not using Bugzilla or Twiki anymore, therefore I do not actively develop this plugin. Great to see that many users find this plugin usefull, I already forgot about it.

Is there someone willing to take over the development? Please feel free to do so.

Cheers Florian

-- FlorianGnaegi - 2011-12-13

In TWiki6, had to change BUGIMGURL = %ATTACHURL%/bug_small.gif to BUGIMGURL = %PUBURL%/%TWIKIWEB%/BugzillaLinkPlugin/bug_small.gif

-- Nicholas Sushkin - 2015-07-23

To allow linking to specific comments, it would've been enough just to allow links like !%BUG{12345#c5}%, which would link to .../bugzilla/show_bug.cgi?id=12345#c5

-- Nicholas Sushkin - 2015-08-19

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip BugzillaLinkPlugin-1.300.zip r2 r1 manage 7.1 K 2005-10-03 - 21:40 JoanTouzet Updated plugin, v1.300, Dakar compliant + cleanups
Compressed Zip archivezip BugzillaLinkPlugin.zip r1 manage 6.8 K 2002-12-22 - 09:12 AnthonPang Repackaged BugzillaListPlugin1.1.tar.gz
PNGpng bug_small.png r1 manage 0.2 K 2003-05-02 - 18:04 AnthonPang PNG version of bug_small.gif
PNGpng bug_small_white.png r1 manage 0.2 K 2003-05-02 - 18:05 AnthonPang bug_small.gif with white background
Edit | Attach | Watch | Print version | History: r29 < r28 < r27 < r26 < r25 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r29 - 2015-08-19 - NicholasSushkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.