Skip to content

Conversation

@Clindbergh
Copy link

@Clindbergh Clindbergh commented Dec 5, 2025

Resolves (probably) IJPL-221819 Cannot connect to Jira Cloud


Note

Expands the JIRA_ID_PATTERN to accept digits and underscores in project keys.

  • JIRA task parsing:
    • Update JIRA_ID_PATTERN in JiraRepository from \p{javaUpperCase}+-\d+ to [\p{javaUpperCase}\p{Digit}_]+-\d+ to recognize issue keys with digits/underscores in the project part.

Written by Cursor Bugbot for commit 646349a. This will update automatically on new commits. Configure here.

private static final boolean REDISCOVER_API = Boolean.getBoolean("tasks.jira.rediscover.api");

public static final Pattern JIRA_ID_PATTERN = Pattern.compile("\\p{javaUpperCase}+-\\d+");
public static final Pattern JIRA_ID_PATTERN = Pattern.compile("[\\p{javaUpperCase}\\p{Digit}_]+-\\d+");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Regex allows JIRA IDs starting with digits or underscores

The updated JIRA_ID_PATTERN regex now matches strings like 123-456 or ___-123 because it allows digits and underscores as the first character. JIRA project keys must start with a letter, so the pattern should enforce that the first character is an uppercase letter, with digits and underscores allowed only in subsequent positions. This could cause unnecessary API calls when user input like 123-456 incorrectly matches the pattern.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant