Skip to content

refactoring query issue for adding different status#489

Closed
dhiemaz wants to merge 2 commits intoankitpokhrel:mainfrom
dhiemaz:feature/jira-list-different-status
Closed

refactoring query issue for adding different status#489
dhiemaz wants to merge 2 commits intoankitpokhrel:mainfrom
dhiemaz:feature/jira-list-different-status

Conversation

@dhiemaz
Copy link

@dhiemaz dhiemaz commented Oct 27, 2022

@ankitpokhrel, I want to contribute as part of hacktoberfest to issue #488

for single status

$jira issue list --assignee prawira.dimas.yudha@gmail.com --status "TO DO"

for multiple status

$issue list --assignee prawira.dimas.yudha@gmail.com --status "TO DO","BLOCKED"

@ankitpokhrel
Copy link
Owner

Hi @dhiemaz, thank you for the PR. While this works, let's use stringArray for consistency reasons. We do something similar for labels.

@dhiemaz
Copy link
Author

dhiemaz commented Nov 8, 2022

Hi @ankitpokhrel thank you for your feedback, ok let me change it.

FilterBy("component", i.params.Component).
FilterBy("parent", i.params.Parent)

q.In("status", statuses...)
Copy link

Choose a reason for hiding this comment

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

Is it not enough to append the statuses filter

q.FilterBy("type" ...
statuses := strings.Split(i.params.Status, ",")
if len(statuses) > 1 {
   q.In("status", statuses)
}

or even without if

@ankitpokhrel
Copy link
Owner

Closing in favor of #573. Thank you for your contribution!

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.

3 participants