The JIRA macro fails for JIRA projects with numbers in the project key
症状
You have a JIRA macro using a default parameter to specify an issue key and the project key part contains numbers e.g. TST1-324. The macro will render an empty table of JIRA issues containing the error message -
The jira server was not able to process the search. This may indicate a problem with the syntax of this macro. Alternatively, if this macro is requesting specific issue keys, you may not have permissions to wiew one of these issues.
For this problem to have occurred you must be inserting JIRA macros using wiki markup of the form -
{jira:TST1-324}
If this problem is occurring on Confluence 4.1.2 or higher then it is due to any of the following -
- Existing usages of the JIRA macro as shown above which have migrated to the new XHTML format.
- You are using the 'Insert' > 'Wiki Markup' dialog and entering the above style syntax.
- You are using the remote API to convert the above syntax.
原因
The format of JIRA property keys was wrongly assumed in Confluence to be of a specific format. It is instead configurable in JIRA. This meant that components within Confluence were failing to recognise certain issue keys where the project key part had been customised.
回避策
Instead of using the default parameter of the JIRA macro specify the issue key with the 'key' parameter e.g.
{jira:key=TST1-324}
In most cases this macro is used in the Confluence editor via the 'Insert' > 'JIRA Issue' menu item. In Confluence 4.1.2 this has been fixed and will properly handle JIRA project keys that contain numbers (and almost any other ASCII characters). The auto-convert of pasted JIRA URLs will also work as expected.
If you are using a version of Confluence from 4.0 to 4.1.1 then your work around is to use the 'Insert' > 'Wiki Markup' dialog with the syntax given above.
ソリューション
Upgrade to Confluence 4.1.2 or later. Any existing broken usages of the macro should be manually fixed.