Skip to content

Instantly share code, notes, and snippets.

@bastos
Created October 3, 2008 14:37
Show Gist options
  • Save bastos/14566 to your computer and use it in GitHub Desktop.
Save bastos/14566 to your computer and use it in GitHub Desktop.
Ubiquity Jira Search, Fork, edit your JIRA URL and use
// Customize your jira address
// Based on apidock.org Ubiquity Search: http://gist.github.com/8132
CmdUtils.CreateCommand(
{
name: "jira",
takes: {"function": noun_arb_text},
icon: "http://www.atlassian.com/favicon.ico",
homepage: "http://tiago.zusee.com",
author: {name: "Tiago Bastos", email: "comechao@gmail.com"},
license: "MPL,GPL",
description: "Search on JIRA quicksearch",
help: "Search on JIRA quicksearch",
execute: function(directObject)
{
var url = "http://jira.server.com.br/secure/QuickSearch.jspa?searchString={QUERY}"
var urlString = url.replace("{QUERY}", directObject.text);
Utils.openUrlInBrowser(urlString);
},
preview: function(pblock, directObject)
{
searchText = jQuery.trim(directObject.text);
if(searchText.length <= 0)
{
pblock.innerHTML = "Search on JIRA quicksearch";
return;
}
var previewTemplate = "Search on JIRA: ${query}";
var previewData = {query: searchText};
pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment