The Bugzilla GUI doesn’t support adding a new version to all products. I used to add new versions to each product one by one. This got very tedious and annoying, especially as the number of products grew. I searched online for solutions provided by others and found only one thread on the topic on Nabble and on the Bugzilla support forum. In these threads the only suggested solutions were to use SQL on the Bugzilla DB, or to use custom fields instead of the built-in version field.
None of these solutions are satisfactory in my opinion, so I decided to create a better one. I created it in the form of a Perl script using the Bugzilla Perl API. The script can be run on the machine on which Bugzilla in installed and is really easy to use. Just put it in the installation directory of Bugzilla and run:
Here is the script itself:
- The script must be in the Bugzilla installation directory in order to work properly. Alternatively – you can put the script anywhere on the machine and add the Bugzilla installation directory into the Perl library path.
- The script uses the Bugzilla API, which requires several Perl modules to be installed. These are usually installed by the install-module.pl script, but if any are missing – they can be installed from CPAN. Instructions on installing CPAN modules can be found here.
I saw this script and it looks fantastic. I am sure I will use it but not for adding version but components. I know its just a two liner, but the beauty is its simple, straight and elegant. Kudos, to your style of coding.
I’d recommend putting the script in the bugzilla directory and adding this line to the top:
use lib qw(lib);
That way it will properly use the libraries installed with install-module.pl.
Thanks for the input!
I’ve changed the script a bit so that if it is put in the Bugzilla installation directory, it uses that directory and also the ‘lib’ sub-directory.
Now there is no need to add anything to the PERL5LIB and there is no need to install any additional Perl modules.
The updated post should reflect these changes.