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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

754 views 2 19
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