Skip to content

Instantly share code, notes, and snippets.

@vidarl
Last active February 12, 2026 14:39
Show Gist options
  • Select an option

  • Save vidarl/633e2a8dfe055fd4a0d61e46ebc1c267 to your computer and use it in GitHub Desktop.

Select an option

Save vidarl/633e2a8dfe055fd4a0d61e46ebc1c267 to your computer and use it in GitHub Desktop.
Greasemonkey script for linking from new to old jira tracker
// ==UserScript==
// @name Link from new Jira cloud to old Jira
// @namespace https://gist.github.com/vidarl/633e2a8dfe055fd4a0d61e46ebc1c267
// @version 3.0
// @description Add a link to the corresponding issues.ibexa.co ticket page
// @match https://ibexa.atlassian.net/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
function init() {
const match = window.location.pathname.match(/^\/browse\/([a-zA-Z0-9_-]+-\d+)$/);
if (!match) return;
const browseId = match[1];
const targetUrl = `https://issues.ibexa.co/browse/${browseId}`;
const header = document.querySelector('[data-testid="page-layout.top-nav"]');
if (!header) return;
const searchButton = header.querySelector(
'[data-testid="atlassian-navigation.ui.search.quickfind-skeleton-wrapper"]'
);
if (!searchButton) return;
if (header.querySelector('.issues-link-container')) return;
// This is the flex row that contains Search + Create
const flexRow = searchButton.closest('div[class*="_zulpu2gc"]');
if (!flexRow) return;
const container = document.createElement('div');
container.className = 'issues-link-container';
container.style.display = 'flex';
container.style.alignItems = 'center';
container.style.marginRight = '12px';
const link = document.createElement('a');
link.href = targetUrl;
link.textContent = 'View on issues.ibexa.co';
link.target = '_blank';
link.rel = 'noopener noreferrer';
link.style.padding = '6px 12px';
link.style.whiteSpace = 'nowrap';
link.style.textDecoration = 'none';
container.appendChild(link);
// Insert directly before search button
flexRow.insertBefore(container, searchButton);
}
const observer = new MutationObserver(init);
observer.observe(document.body, { childList: true, subtree: true });
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment