ankitpokhrel/jira-cli

JSON output option for `issue view`

mpalahuta opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Hey! Thanks a lot for this great tool! I want to use it in a release automation project for a client company. However, I'll need to be able to format the output of the jira issue view in a machine-readable way (JSON). Additionally, I'll also need to add the emailAddress field to the issue data structure. Would that be OK, @ankitpokhrel?

Use case: Jira automation from Jenkins pipeline scripts; using email to link users between various systems f.e. Slack.

Describe the solution you'd like
I'd like to create two PRs:

  • A PR adding the emailAddress field to the pkg/jira/IssueFields data structure and update the jira view issue to display the field as well (for consistency) #719
  • A PR adding --json option to the jira view issue command that would make the command print the output as plain JSON if the flag is set #720

Describe alternatives you've considered
Parsing the current output programmatically is hard and not reliable

Closed with #720