Issue Details (XML | Word | Printable)

Key: JRA-11390
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tim Pettersen [Atlassian]
Reporter: Nick Menere [Atlassian]
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JIRA

Single letter Project keys fail

Created: 26/Oct/06 09:41 PM   Updated: 17/Jan/07 02:22 AM
Component/s: Project Management
Affects Version/s: None
Fix Version/s: 3.7.2

Time Tracking:
Not Specified

Participants: Anton Mazkovoi [Atlassian], Martin Gfeller, COMIT, Nick Menere [Atlassian] and Tim Pettersen [Atlassian]
Since last comment: 1 year, 33 weeks, 2 days ago
Resolution Date: 08/Jan/07 06:17 PM
Labels:


 Description  « Hide
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
     */
    public static boolean validIssueKey(String key)
    {
        if (key == null)
            return false;

        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.....



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
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


Nick Menere [Atlassian] added a comment - 02/Jan/07 11:56 PM
Had a customer running on this for 2+ months.

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

Martin Gfeller, COMIT added a comment - 17/Jan/07 02:22 AM
Thank you! Martin (the customer using it)