如何使jira支持在project key中使用数字等字符?
To do so, modify this file:
atlassian-jira\WEB-INF\classes\jira-application.properties
line 93 (# Project Key Pattern)
Simply comment out the original code, and put in your own, using a regular expression that defines a valid format. I've included mine (which expects three upper case letters followed by any number of letters and numbers), and a modified description.
jira.projectkey.pattern = ([A-Z]{3}[A-Z0-9_]*)
jira.projectkey.warning = You must specify a unique project key, at least 3 characters long, containing only uppercase letters.
jira.projectkey.description = Usually the key is just the docket ID - e.g. ABC001<br><i>It is recommended to use only ASCII characters, as other characters may not work.</i>
jira.projectkey.pattern = ([A-Z][A-Z]+)
jira.projectkey.warning = You must specify a unique project key, at least 3 characters long. The first two characters must be uppercase letters.
jira.projectkey.description = Usually the key is just 3 letters - i.e. if your project name is Foo Bar Raz, a key of FBR would make sense.<br>The key must contain only uppercase alphabetic characters, and be at least 2 characters in length.<br><i>It is recommended to use only ASCII characters, as other characters may not work.</i>
I will warn you, though... if you change the properties such that an existing project key will not satisfy the new rule, you'll have a problem.. in that case, I dumped the date to XML and changed the project key manually (and had to rename all attachment folders too).
Hope that helps.
atlassian-jira\WEB-INF\classes\jira-application.properties
line 93 (# Project Key Pattern)
Simply comment out the original code, and put in your own, using a regular expression that defines a valid format. I've included mine (which expects three upper case letters followed by any number of letters and numbers), and a modified description.
jira.projectkey.pattern = ([A-Z]{3}[A-Z0-9_]*)
jira.projectkey.warning = You must specify a unique project key, at least 3 characters long, containing only uppercase letters.
jira.projectkey.description = Usually the key is just the docket ID - e.g. ABC001<br><i>It is recommended to use only ASCII characters, as other characters may not work.</i>
jira.projectkey.pattern = ([A-Z][A-Z]+)
jira.projectkey.warning = You must specify a unique project key, at least 3 characters long. The first two characters must be uppercase letters.
jira.projectkey.description = Usually the key is just 3 letters - i.e. if your project name is Foo Bar Raz, a key of FBR would make sense.<br>The key must contain only uppercase alphabetic characters, and be at least 2 characters in length.<br><i>It is recommended to use only ASCII characters, as other characters may not work.</i>
I will warn you, though... if you change the properties such that an existing project key will not satisfy the new rule, you'll have a problem.. in that case, I dumped the date to XML and changed the project key manually (and had to rename all attachment folders too).
Hope that helps.
