Simplest Enterprise Continuous Integration Solutions

Saturday, October 16, 2010

BugZilla: BugZilla 3.0.6 Configuration


# configure BugZilla as administrator

# Parameters Link

Required Settings

            Maintainer: bugzilla@fedora12.local.lab
            Urlbase: http://fedora12.local.lab

Administrative Policies

            Allowbugdeletion: off -> on

User Authentication

            Requirelogin: off -> on
            Createemailregrexp: .* 

Bug Change Policies

            Letsubmitterchoosepriority: on -> off
            Letsubmitterchoosemilestone: on -> off
            Commentoncreate: off -> on
            Commentonreopen: off -> on

Bug fields

            Defaultpriority: P5 -> P3
            Defaultseverity: enhancement -> normal

Group Security

            Makeproductgroups: off -> on
            Useentrygroupdefault: off -> on

Email

            Mail_delivert_method: Sendmail -> SMTP

Query Defaults

            Specific_search_allow_enpty_words: off -> on

User Matching

            Usemenuforusers: off -> on

Default Preferences Link

After changing a  bug

            Show next bug in my list -> Show the updated bug

Products Link


Field Value Link

Resolution:

            CREATION, UNIT-TEST

# Custom Configuration 

# UNIT-TEST with comment template:

Add below code into bugzilla/template/en/default/bug/edit.html.tmpl  line 75

    /* Adds the Code Complete fields to the `comment' textarea */
  function codeComplete() {
      var codeCompleteText = "Solution Description  (component(s) modified: MAC,phyD, phy, etc):\n";

      codeCompleteText += "Affected files:\n";
      codeCompleteText += "Branch where fix is located:\n";
      codeCompleteText += "Root branch (Where did the above branch originate from?) and revision:\n";
      codeCompleteText += "Dependencies:\n";
      codeCompleteText += "Code reviewed by:\n";
      codeCompleteText += "How was the fix tested:\n";
      codeCompleteText += "List the test cases used and/or built:\n";
      codeCompleteText += "Were the new test case put under revision control:\n";
      codeCompleteText += "What criteria is there to conclude the original issue is fixed:\n";
      codeCompleteText += "Instructions to allow Testers to Verify:\n";

      /* <textarea id="comment"> */
      var textarea = document.getElementById('comment');
      textarea.value = codeCompleteText + textarea.value;

      textarea.focus();
  }

Change bugzilla/template/en/default/bug/knob.html.tmpl line 190

          onchange="document.changeform.knob[[% knum %]].checked=true; if (this.value == 'UNIT-TEST') {codeComplete();}">
Instead of
          onchange="document.changeform.knob[[% knum %]].checked=true">

# Creation with Comment template:

Change bugzilla/template/en/default/bug/create.html.tmpl line 463

         defaultcontent = "Product:\nVersion:\nHardware platform:\nHardware revision:\nPCT or Base Station:\nPCT or Base Station software version:\n\nOverview: More detailed restatement of summary.\n\nProduct Impact:\n\nSteps to Reproduce: Minimized, easy-to-follow steps that will trigger the bug. Include any special setup steps. What is the frequency of occurrence?\n\nActual Results: What the application did after performing the above steps.\n\nExpected Results: What the application should have done, were the bug not present.\n\nBuild Date & Platform: Date and platform of the build in which you first encountered the bug.\n\nAdditional Builds and Platforms: Whether or not the bug takes place on other platforms (or browsers, if applicable).\n\nAdditional Information: Any other useful information.\n\nDoes a work around exist for the problem? If so, include steps to work around.\n\nDo you have a proposed solution to the problem? If so, include the appropriate information.\n\nAttach logs and describe as appropriate:"
Instead of
         defaultcontent = defaultcontent

# Reassign to “ASSIGNED” instead of “NEW”

Change bugzilla/process_bug.cgi line 1182

        ChangeStatus('ASSIGNED');
Instead of
        ChangeStatus('NEW');

# Resolution FIXED with comment template:

change
 to

Add below code into bugzilla/template/en/default/bug/edit.html.tmpl  line 97

    /* Adds the daily Regression fields to the `comment' textarea */
  function dailyRegression() {
      var dailyRegressionText = "Daily Regression Description:\n";

      dailyRegressionText += "Which daily build load did you test:\n";
      dailyRegressionText += "Daily build load compiled branch name and revision:\n";
      dailyRegressionText += "Dependencies:\n";
      dailyRegressionText += "How was the fix tested:\n";
      dailyRegressionText += "List the test cases used and/or built:\n";
      dailyRegressionText += "Were the new test case put under revision control:\n";
      dailyRegressionText += "What criteria is there to conclude the original issue is fixed:\n";
      dailyRegressionText += "Instructions to allow Testers to Verify:\n";

      /* <textarea id="comment"> */
      var textarea = document.getElementById('comment');
      textarea.value = dailyRegressionText + textarea.value;

      textarea.focus();
  }

Change bugzilla/template/en/default/bug/knob.html.tmpl line 190

        onchange="document.changeform.knob[[% knum %]].checked=true; if (this.value == 'UNIT-TEST') {codeComplete();}; if (this.value == 'FIXED') {dailyRegression();}">
Instead of
        onchange="document.changeform.knob[[% knum %]].checked=true; if (this.value == 'UNIT-TEST') {codeComplete();}">

# Custom fields

cf_found_in_rel



cf_closed_in_rel





cf_plannedrel

 

cf_action





cf_grouping



chgrp –R apache custom
/var/www/html/bugzilla/checksetup.pl

Saturday, October 9, 2010

BugZilla: BugZilla 3.0.6 on Fedora12


[root@fedora12 ~]# uname -a
Linux fedora12.local.lab 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 i686 i386 GNU/Linux

# install Apache

[root@fedora12 ~]# yum install httpd
[root@fedora12 ~]# service httpd restart

# configure httpd

insert /etc/httpd/conf/httpd.conf with

Alias /bugzilla/ "/var/www/html/bugzilla/"

<Directory /var/www/html/bugzilla>
    AddHandler cgi-script .cgi
    Options +Indexes +ExecCGI +FollowSymLinks
    DirectoryIndex index.cgi
    AllowOverride Limit
</Directory>

# Change
DocumentRoot “/var/www/html” -> DocumentRoot “/var/www/htrml/bugzilla” for fixing firefox browser issue

# install PostgreSQL

# make sure /usr/bin/pg_config existence for DBI:Pg installation
[root@fedora12 ~]# yum install postgresql-devel               
[root@fedora12 ~]# yum install postgresql-server
# check version postgresql-8.4.5-1.fc12.i686
[root@fedora12 ~]# rpm –q postgresql                                

[root@fedora12 ~]# service postgresql initdb

[root@fedora12 ~]# su – postgres

Edit /var/lib/pgsql/data/pg_hba.conf
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
host all bugs 127.0.0.1 255.255.255.255 md5
# "local" is for Unix domain socket connections only
local   all         all                               md5
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

[root@fedora12 ~]# service postgresql restart

# add Postgres user

[root@fedora12 ~]# createuser -U postgres -dAP bugs
[root@fedora12 ~]# service postgresql restart
[root@fedora12 ~]# psql -h 127.0.0.1 -U bugs –W

# install bugzilla-3.0.6

[root@fedora12 ~]# cd /usr/local
[root@fedora12 ~]# tar –xvf /tmp/bugzilla-3.0.6.tzr.bzip to /usr/local
[root@fedora12 ~]# chgrp –R apache /usr/local/bugzilla-3.0.6
[root@fedora12 ~]# ln -s /usr/local/bugzilla-3.0.6 /var/www/html/bugzilla

# run checksetup.pl

[root@fedora12 ~]# /var/www/html/bugzilla/checksetup.pl --check-modules





yum install perl-CPAN
/usr/bin/perl -MCPAN -e 'install "Email::Send"'
/usr/bin/perl -MCPAN -e 'install "Email::MIME"'
/usr/bin/perl -MCPAN -e 'install "Template"'
/usr/bin/perl -MCPAN -e 'install "Email::MIME::Modifier"'
/usr/bin/perl -MCPAN -e 'install "DBI"'
/usr/bin/perl -MCPAN -e 'install "Date::Format"'

[root@fedora12 ~]# /usr/bin/perl -MCPAN -e 'install "DBD::Pg"'

Edit /var/www/html/bugzilla/localconfig
$db_pass = 'bugzilla';

[root@fedora12 ~]# /var/www/html/bugzilla/checksetup.pl
 







# Troubleshooting:

[root@fedora12 ~]# cd /var/www/html/bugzilla
./testserver.pl http://fedora12.local.lab/bugzilla
TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got front picture.
Use of uninitialized value $response in pattern match (m//) at ./testserver.pl line 110.
Use of uninitialized value $response in pattern match (m//) at ./testserver.pl line 110.
TEST-FAILED Webserver is not executing CGI files.
TEST-OK Webserver is preventing fetch of http://fedora12.local.lab/bugzilla/localconfig.
TEST-OK GD version 2.45, libgd version 2.0.34; Major versions match.
TEST-OK GD library generated a good PNG image.
TEST-OK Chart library generated a good PNG image.
TEST-OK Template::Plugin::GD is installed.
[root@fedora12 ~]# chcon -R -t httpd_sys_content_t /var/www/html/bugzilla/

# configure SELinux

[root@fedora12 ~]# system-config-selinux
Status: enforcing -> permissive
Or
Boolean: httpd_can_network_connect_db uncheck -> checked

Enable send email

Boolean: httpd_can_sendmail uncheck -> checked

# BugZilla 3.0.6