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

feat(IssueService): allow empty JQL #268

Merged
merged 1 commit into from
May 2, 2020

Conversation

kfoxb
Copy link
Contributor

@kfoxb kfoxb commented Apr 2, 2020

PR Description

This allows the client to make calls with empty JQL specified. My use case is getting all issues in a Jira instance which you typically do by running an empty search. Currently, specifying an empty string makes an invalid URL because the JQL param is always specified. This PR fixes the issue by dynamically building the URL with url.URL and url.Values types according to the options specified.

Note that some tests had to be changed because when you encode url.Values the params get sorted alphabetically.

Checklist

@andygrunwald andygrunwald merged commit 4b91cf2 into andygrunwald:master May 2, 2020
@andygrunwald
Copy link
Owner

Thanks a lot @kfoxb!

andygrunwald added a commit that referenced this pull request May 2, 2020
* master:
  feat(IssueService): allow empty JQL (#268)
  style: Fix staticcheck (static analysis) errors for this library (#283)
  feat(project): Add workflow to greet new contributors (#288)
  feat(project): Add cronjob to check for stale issues (#287)
  feat(issues): Add GetEditMeta on issue
andygrunwald added a commit that referenced this pull request May 12, 2020
* master:
  fix(tests): Fix TestIssueService_PostAttachment unit test
  style: Fix typos
  style: Make code go fmt conform
  chore(test): Remove unit testing log output for success cases (#293)
  feat(project): Add GitHub Actions testing workflow (#289)
  feat(context): Add support for context package
  fix(issue): IssueService.Search() with a not empty JQL triggers 400 bad request (#292)
  feat(IssueService): allow empty JQL (#268)
  style: Fix staticcheck (static analysis) errors for this library (#283)
  feat(project): Add workflow to greet new contributors (#288)
  feat(project): Add cronjob to check for stale issues (#287)
  feat(issues): Add GetEditMeta on issue
  feat: Add Names support on Issue struct (#278)
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.

2 participants