/**
* @return True if the supplied issue key starts with a valid project key, and ends with a number
*/
publicstaticboolean validIssueKey(String key)
{
if (key == null)
returnfalse;
int hypenLocation = key.lastIndexOf('-');
if (hypenLocation > 1)
...
if (hypenLocation > 1) fails for single letter project keys. (translates to - hyphen appears after the 2 letter - 0 is the first char)
Should be changed to - if (hypenLocation > 0) (hyphen is not the first letter)
And, Mike, I wont even bring up the spelling mistake.....
Description
JiraKeyUtils contains the following code:
JiraKeyUtiles.java
/**
* @return True if the supplied issue key starts with a valid project key, and ends with a number
*/
publicstaticboolean validIssueKey(String key)
{
if (key == null)
returnfalse;
int hypenLocation = key.lastIndexOf('-');
if (hypenLocation > 1)
...
if (hypenLocation > 1) fails for single letter project keys. (translates to - hyphen appears after the 2 letter - 0 is the first char)
Should be changed to - if (hypenLocation > 0) (hyphen is not the first letter)
And, Mike, I wont even bring up the spelling mistake.....
Anton Mazkovoi [Atlassian] added a comment - 05/Nov/06 10:27 PM Sam,
Can you look if the suggested fix, changing the if statement to test for > 0 works?
Talk to someone before actually fixing and committing code.
Thanks,
Anton
Tim Pettersen [Atlassian] added a comment - 08/Jan/07 06:17 PM The suggested fix (including the spelling mistake) has been tested and implemented - single letter project keys will be properly supported in 3.7.2
Can you look if the suggested fix, changing the if statement to test for > 0 works?
Talk to someone before actually fixing and committing code.
Thanks,
Anton