Skip to content

Commit

Permalink
jipsearch: Fixed multiple -k attributes on command line
Browse files Browse the repository at this point in the history
When specifying more than one issue key with --key in jipsearch they
were ANDed together. Fixed so that they are now in a key in (key1,
key2,...) statement.

Signed-off-by: Julianus Larson <[email protected]>
  • Loading branch information
JLLinaro committed Jun 30, 2023
1 parent b8a88a3 commit a7578f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jipdate/jipsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ def create_jql(jira, initial_jql):
jql_parts.append(initial_jql)

if cfg.args.key:
for v in cfg.args.key:
jql_parts.append(f"key={v}")
key_parts = f"key in ({cfg.args.key[0]}"
for v in cfg.args.key[1:]:
key_parts += f", {v}"
jql_parts.append(f"{key_parts})")

if cfg.args.project:
jql_parts.append("project in (%s)" % cfg.args.project)
Expand Down

0 comments on commit a7578f3

Please sign in to comment.