Bugzilla:FAQ:Bugzilla Hacking: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 53: Line 53:
{{Navigation Bugzilla FAQ}}
{{Navigation Bugzilla FAQ}}


[[category:Bugzilla|F]]
[[category:Bugzilla|FAQ:Bugzilla Hacking]]

Revision as of 18:25, 3 November 2007

What kind of style should I use for templatization?

Gerv and Myk suggest a 2-space indent, with embedded code sections on their own line, in line with outer tags. Like this:


<fred>
[% IF foo %]
  <bar>
  [% FOREACH x = barney %]
    <tr>
      <td>
        [% x %]
      </td>
    <tr>
  [% END %]
[% END %]
</fred>

Myk also recommends you turn on PRE_CHOMP in the template initialization to prevent bloating of HTML with unnecessary whitespace.

Please note that many have differing opinions on this subject, and the existing templates in Bugzilla espouse both this and a 4-space style. Either is acceptable; the above is preferred.

What bugs are in Bugzilla right now?

Try this link to view current bugs or requests for enhancement for Bugzilla.

You can view bugs marked for 2.22 release here. This list includes bugs for the 2.22 release that have already been fixed and checked into CVS. Please consult the Bugzilla Project Page for details on how to check current sources out of CVS so you can have these bug fixes early!

How can I change the default priority to a null value? For instance, have the default priority be "---" instead of "P2"?

This is well-documented in bug 49862. Ultimately, it's as easy as adding the "---" priority field to your localconfig file in the appropriate area, re-running checksetup.pl, and then changing the default priority in your browser using editparams.cgi.

What's the best way to submit patches? What guidelines should I follow?

  1. Enter a bug into bugzilla.mozilla.org for the "Bugzilla" product.
  2. Upload your patch as a unified diff (having used "diff -u" against the current sources checked out of CVS), or new source file by clicking "Create a new attachment" link on the bug page you've just created, and include any descriptions of database changes you may make, into the bug ID you submitted in step #1. Be sure and click the "Patch" checkbox to indicate the text you are sending is a patch!
  3. Announce your patch and the associated URL (https://bugzilla.mozilla.org/show_bug.cgi?id=XXXXXX) for discussion in the newsgroup (mozilla.support.bugzilla on the news.mozilla.org news-server). You'll get a really good, fairly immediate reaction to the implications of your patch, which will also give us an idea how well-received the change would be.
  4. If it passes muster with minimal modification, the person to whom the bug is assigned in Bugzilla is responsible for seeing the patch is checked into CVS.
  5. Bask in the glory of the fact that you helped write the most successful open-source bug-tracking software on the planet :)