Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority field not set #383

Closed
JimmyAlkhouri opened this issue Apr 9, 2024 · 8 comments · Fixed by reload/jira-security-issue#69
Closed

Priority field not set #383

JimmyAlkhouri opened this issue Apr 9, 2024 · 8 comments · Fixed by reload/jira-security-issue#69
Assignees

Comments

@JimmyAlkhouri
Copy link

I'm getting a priority field not set error:

In JiraSecurityIssue.php line 217:

[RuntimeException]
Could not create issue: CURL HTTP Request Failed: Status Code : 400, URL:https://companyname.atlassian.net/rest/api/2/issue
Error Message : {"errorMessages":[],"errors":{"priority":" Specify the Priority (name) in the string format"}}

Exception trace:
at /opt/ghsec-jira/vendor/reload/jira-security-issue/src/JiraSecurityIssue.php:217
Reload\JiraSecurityIssue->ensure() at /opt/ghsec-jira/src/SyncCommand.php:100
GitHubSecurityJira\SyncCommand->execute() at /opt/ghsec-jira/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at /opt/ghsec-jira/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at /opt/ghsec-jira/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at /opt/ghsec-jira/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /opt/ghsec-jira/bin/ghsec-jira:18

Here are my configuration:
- name: "Sync security alerts to Jira issues"
uses: reload/github-security-jira@v1.x
env:
SECURITY_TOKEN: ***
JIRA_TOKEN: ***
JIRA_HOST: ***
JIRA_USER: ***
JIRA_ISSUE_TYPE: Story
JIRA_PROJECT: ***
JIRA_ISSUE_LABELS: DEP_ISSUE

I'm wondering if others are experiencing the same issue or the last bot update caused it by any chance?

Thanks!

@arnested
Copy link
Member

Hi @JimmyAlkhouri

We added explicit support for priorities recently: reload/jira-security-issue#67.

The code now defaults to the “Undecided” priority instead of letting Jira assign a priority itself.

Do you have an “Undecided” priority in your project? Maybe our assumption that such priority always exists is wrong.

If you don't have an “Undecided” priority, you can specify another priority with the JIRA_PRIORITY environment variable in the configuration.

@arnested arnested self-assigned this Apr 10, 2024
@JimmyAlkhouri
Copy link
Author

Hi @arnested,

Thank you for the prompt reply! we default our JIRAs to priority "High". We don't use "Undecided." I think letting Jira assign priority might be more appropriate.

@arnested
Copy link
Member

Our problem was Jira changed the way it assigned the priority.

It used to give me issues "Undecided" but then suddenly changed to "Minor".

We are alerted of security issues with priority Undecided and then assign a priority ourselves when we have looked into the issue.

Jiras sudden change resulted in us missing out on new security issues for about a week before we discovered the problem.

@JimmyAlkhouri
Copy link
Author

Was the change in on premise vs Jira cloud offering? or the API v2 vs v3? My understanding v3 is still in beta.

@JimmyAlkhouri
Copy link
Author

Hi @arnested,

Is it possible to use a version before the recent change was made? we are currently using 1.x

Thanks!

@arnested
Copy link
Member

arnested commented Apr 15, 2024

I think using reload/github-security-jira@4c4e2b39b6ea669c417ee42947e07e92a057a9fc should give you the last version before the priority change.

For your info, I intend to go back to not setting a priority (but keep the option to set one using the environment). But I/we are quite busy currently, so I can't promise when we'll get around to it.

@arnested
Copy link
Member

Hi @JimmyAlkhouri, I believe we have resolved the issue now.

We only set a priority if a JIRA_PRIORITY variable is explicitly set.

@JimmyAlkhouri
Copy link
Author

Hi @arnested, Thank you for addressing it. I appreciate your help!

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

Successfully merging a pull request may close this issue.

2 participants