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

Attach high level update_field() to Issue resources #49

Merged
merged 5 commits into from
Aug 1, 2024
Merged

Conversation

lhh
Copy link
Owner

@lhh lhh commented Aug 1, 2024

Since we have issue.field() resolver, now we have the issue.update_field(...) call so users don't have have to think about updating things. We now call this from the CLI as well.

lhh added 5 commits August 1, 2024 13:39
_field is documented to return the field name from input string
field is documented to return the field value

If querying a field with a human-readable string (ex: fixVersions,
queried by 'fixversions'), there was a corner case where we would
return the field name from field() and issue.field()
We already had field(high_level_name); this is the setter
method for the same thing.
This replaces the set_field() call with the logic we use to update fields
from the command line.  This enables callers to dynamically things
utilizing the input field resolution and type resolution/translation we
already had.

Callers who want to do it themselves can still call issue.update().

  issue = jirate_obj.issue('MYKEY-123')
  issue.update_field('fixed_in_build', 'my-rpm-1.2.3-1')
  issue.update_field('labels', 'mylabel', 'add')
@lhh lhh changed the title Input automagic Attach high level update_field() to Issue resources Aug 1, 2024
@lhh lhh merged commit 11b0828 into main Aug 1, 2024
4 checks passed
@lhh lhh deleted the input_automagic branch August 1, 2024 17:50
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.

1 participant