From 3acabfcd58d6fb247d5aa661b0b39f187f434cd8 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 7 Jan 2025 13:35:48 +0100 Subject: [PATCH] misc: small refactoring --- src/cli.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index cbbad8a..1e16c1e 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -116,7 +116,7 @@ const runProgram = async () => { let storyPoints: Size = issue.fields[jira.fields.storyPoints]; const setStoryPoints = !storyPoints; - if (!storyPoints) { + if (setStoryPoints) { const answer: SizeWithControls = await select({ message: 'Story Points', choices: [ @@ -177,7 +177,7 @@ const runProgram = async () => { let priority = parsedPriority.success ? parsedPriority.data : undefined; const setPriority = !priority; - if (!priority) { + if (setPriority) { const answer: PriorityWithControls = await select({ message: 'Priority', choices: [ @@ -236,7 +236,7 @@ const runProgram = async () => { // This is workaround, We should use api to determine what values are available on the issue if ( - !severity && + setSeverity && issue.fields.issuetype.name !== 'Story' && issue.fields.issuetype.name !== 'Task' ) { @@ -283,7 +283,7 @@ const runProgram = async () => { severity = answer; } else { - setSeverity = !setSeverity; + setSeverity != setSeverity; } // If values are already set, skip setting them