You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Templates enables you to capture issues even faster during testing, by automatically populating fields in issues with your predefined values. Templates are remembered on your JIRA server, so your templates remain the same regardless of which browser you are testing in.

Creating and Using Templates

To create a new template, go to the "Templates" tab in the Bonfire browser extension, then click "Add Template". Here you can pre-fill an issue creation form with any information you would like. (e.g. a particular project, version, or component you are working). Selecting the option "Attach Screenshot by Default" will include a screenshot attachment automatically when you are applying a template.

You can have as many templates as you like, so you can have very specific templates for issues that you may wish to raise during testing.

Templates are used when creating an issue. To do this, simply choose one from the "Use Template" menu on the Create Issue tab in the Bonfire browser extension.

Using Variables

Variables allow templates to contain dynamic information, and are only evaluated into actual values when the template is used during issue creation. Variables only work in templates. To use a variable, enter the variable name surrounded by braces ("{" and "}") into a template.

By default, Bonfire ships with four variables:

  • {cookies} - Are cookies turned on? Value is either true or false.
  • {useragent} - Browser information.
  • {title} - Current page title.
  • {url} - Current page URL.

Creating your own variables to use

The default variables shipped with Bonfire are only a start, but you can create your own variables to do different things. To create another variable, simply click "Add Variable" in the Templates tab of the browser extension. For each variable, you need to provide 2 pieces of information:

  • the name - this is the variable name. You use the variable in templates by enclosing the variable name in '{' and '}'
  • the javascript selector - this is the javascript that will evaluate when you run the variable. This happens when you select a template to use in the create issue tab.

Some other examples:

Name

Javascript Selector

Explanation

jiraVersion
document.getElementById('footer-build-information').innerHTML

This is one specific to JIRA itself. In our JIRA footer, we always include the JIRA version and build numbers. This javascript selector will get this information for us

date
new Date().toDateString()

Today's date.

selectedText

Chrome & Safari

window.getSelection().toString(); 

Firefox

document.getSelection().toString();

IE

document.selection.createRange().text;

Will insert any text that's already selected.

Note that the javascript for this differs across browsers, so you will need to create separate variables for each browser you wish to use this in.

  • No labels