Skip to main content

Function: getDiscordUserIdForJiraName()

function getDiscordUserIdForJiraName(guildId, jiraName): string | undefined

Looks up the Discord user ID for a Jira assignee name.

This helper performs a case-sensitive lookup of the Jira assignee name in the assignee mapping. Returns undefined if no mapping exists.

Parameters​

ParameterTypeDescription
guildIdstringThe Discord guild ID
jiraNamestringThe Jira assignee display name to look up

Returns​

string | undefined

The Discord user ID if a mapping exists, undefined otherwise

Example​

const discordUserId = getDiscordUserIdForJiraName(guildId, 'Alice Jira');
if (discordUserId) {
// Use the Discord user ID
}