Skip to content

[Bug]: --fields drops the entire projection when given a field name valid in JQL but not in the payload #10

Description

@marco-dc

TWG CLI version

1.2.6

Operating system

Ubuntu 24.04 (WSL2)

Command or agent request

# camelCase: the spelling used in JQL
twg jira workitem bulk-get ABC-1 ABC-2 --fields key,statusCategoryChangedDate -o json

# lowercase: the spelling used in the returned payload
twg jira workitem bulk-get ABC-1 ABC-2 --fields key,statuscategorychangedate -o json

Expected behavior

An unrecognised field name should either be reported, or ignored without affecting the field names that were recognised.

Actual behavior

camelCase spelling. Exit code 0, no warning, projection dropped entirely:

items: 2
keys of items[0].data: ['expand', 'id', 'key', 'self', 'url']

lowercase spelling, same items:

items: 2
keys of items[0].data: ['expand', 'id', 'key', 'self', 'statuscategorychangedate', 'url']

Both spellings are valid in different contexts: statusCategoryChangedDate is the JQL spelling, statuscategorychangedate is the key in the returned payload. Copying a field name from a JQL clause into --fields returns exit code 0 and a non-empty response in which every requested field is missing.

If that projection feeds a locally computed filter or count, the result is 0 matches, which is indistinguishable from a legitimate empty result.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions