Search Bugzilla tickets in jira by the Bugzilla ticket number

Hi, we just imported Bugzilla tickets in our JIRA. One of the requests that came to me after the import was complete was to search JIRA for the issue with the bugzilla ticket number just by typing in the external issue id (the bugzilla ticket number) ....Now, I am guessing the search uses issue id as the base to pull up records. So here is my question, can we modify the search in some way so that it uses the external issue id instead to lookup for a matching issue?

1 answer

What we did was to use the bugzilla ID gadget. Instead of referencing the old bugzilla bug search (show_bug.cgi) we placed a file on our server (show_bug.cgi) which actually executed the following script:

<html>
<head>
	<title>JIRA search</title>
	<script type="text/javascript">
		function get(name){
			if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))
				return decodeURIComponent(name[1]);
		}
								
		window.location = 'http://<JIRA-SERVER>:8080/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+DEF+AND+issuetype+%3D+Defect+and+%22External+issue+ID%22+%7E+' + 
			get('id');
	</script>
</head>
<body>
</body>
</html>

Bugzilla ID gadget redirects us to our old bugzilla url. We don't want to do that. We want to search the corresponding jira issue that has that bug. One way we found is using the Simple Search feature in Issue Navigator but it is not quick and not many people in our company are aware of it.

Also, if the script file which you gave will help us, what should be the exact location of this file on our server?

Also, under the Bugzilla Issue ID gadget's search box, it says the following:

"This gadget is incompatible with the new JIRA Importers plugin and will be depreciated. Please use JIRA''s quick search in the top right."

You can ignore that message. Place the file somewhere on a server (that can be reached out of your JIRA) and configure the Bugzilla ID gadget to point to that server location. That way the JQL is executed instead of searching your old bugzilla.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot