2

I spend a lot of time in Bugzilla. Sometimes I wish I could change the tab order on the bug details page to better match how I use it. For example, starting from the Additional Comments box, the tab order is the Commit button, then the help link for the Status fields, then the two Status buttons. When I am reviewing bugs, it would be more convenient to go from Additional Comments to the Status fields and then to the Commit button, and then perhaps to the Next link.

I did not find any relevant settings on the preferences pages and the administrative pages. Without changing the Bugzilla source code, how can I change the tab order on the bug details page? We use the 3.2.3 release.

I should also mention that I ordinarily use Bugzilla with Firefox and Chrome, and rarely with other browsers.

1 Answer 1

2

You can change the tab order with a SeaMonkey script (on Firefox), or a user script (in Chrome). Here is an example:

// ==UserScript==
// @name          Bugzilla tweaks
// @namespace http://bugzilla.yourcompany.com/bugs
// @include http://bugzilla.yourcompany.com/bugs/*
// @version 0

// ==/UserScript==
function setTabIndex(id,index) {
    var node = document.getElementById(id);
    if (node) {
        node.setAttribute("tabIndex",index);
    }
}

function setTabIndexXpath(xpath,index) {
    var result = document.evaluate(xpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);
    if (result.singleNodeValue) {
       result.singleNodeValue.setAttribute("tabIndex",index);
    }
}

setTabIndex("comment",1)
setTabIndex("bug_status",2);
setTabIndex("resolution",3);
setTabIndex("commit",4);
setTabIndexXpath("//a[text()='Next']",5);
setTabIndexXpath("//a[text()='Show last search results']",6);

To use the script in Chrome, just store it on your local filesystem, edit the second (@namespace) and third (@include) lines to reflect your Bugzilla installation's URL, point your browser at the file, and then follow the instructions. It is a very simple process.

You can use the same script in Firefox, but I believe you will need to install SeaMonkey first.

Finally, there is always a potential security risk associated with installing user scripts in your browser. Even if you trust my posts in the SQA forum, you should carefully read the script and attempt to understand it before you install it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.