Moving wiki pages that are linkked-to in Jira

In our World (and possibly yours)

  • Jira is what to do
  • Wiki is how to do it.

Each issue in jira has a link to a wiki page describing the spec.

Our products have their own space but we also have one dumpster space called Wikispace that has a number of smaller in-development project pages like our new one ProductX. All the specs go under a header page ProductxPage.

Now I want to move pages under ProductXPage, to a space of its own. However there are many issues in Jira going directly to different pages under the ProductXpage.

1. How do I do this retaining the link in Jira? After moving a test page, the jira link returned a 'page not found' error.

2. How do I even search for the issues in Jira linking to these pages? I can't find them because in Confluence, each page in a space has a unique name rather than a hierarchial name. i.e Not Wikispace/Header Page/ProductXpage/subpage1 but Wikispace/subpage1 so I can't search 'description contains http://wiki/wikispace/headerPage'

Help!

1 answer

I've copied the answer for your second question from my own question, which is very similar: https://answers.atlassian.com/questions/138741/how-can-i-find-jira-issues-that-are-linkes-to-a-specific-confluence-page

Here's the code in the getQuery method of the scripted JQL function (you essentially put any SQL statement there that returns issue ids) - I called it "linkedToPage"

Query getQuery(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause) {   
	ComponentManager componentManager = ComponentManager.getInstance()
	def delegator = (DelegatorInterface) componentManager.getComponentInstanceOfType(DelegatorInterface.class)
	String helperName = delegator.getGroupHelperName("default");

	def sqlStmt = """select issueid from remotelink where url = 'https://YOUR_CONFLUENCE_DOMAIN/pages/viewpage.action?pageId=""" + operand.args[0] + """'"""

	Connection conn = ConnectionFactory.getConnection(helperName);
	Sql sql = new Sql(conn)
	def booleanQuery = new BooleanQuery()
	sql.eachRow(sqlStmt) {
                booleanQuery.add(new TermQuery(new Term("issue_id", "${it.issueid}")), BooleanClause.Occur.SHOULD)
	}
	return booleanQuery
}

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

397 views 17 9
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