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

This widget could not be displayed.

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
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

596 views 7 6
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