go-jira / jira

simple jira command line client in Go
Apache License 2.0
2.66k stars 323 forks source link

Edit/view "Time Remaining" for issues #376

Open xdhmoore opened 3 years ago

xdhmoore commented 3 years ago

Is it possible to edit or at least to view the Time Remaining field on a Jira issue? jira view doesn't seem to show it and jira worklog add doesn't give any options that I can see to edit it.

voiski commented 3 years ago

Did you try jira fields | jq '.[] | select(.name == "$yourfield")', in example:

$ jira fields | jq '.[] | select(.name == "Remaining Estimate")'
{
  "clauseNames": [
    "remainingEstimate",
    "timeestimate"
  ],
  "id": "timeestimate",
  "name": "Remaining Estimate",
  "navigable": true,
  "schema": {
    "system": "timeestimate",
    "type": "number"
  }
}
xdhmoore commented 3 years ago

That gives me global metadata about the field, but I don't see a way to get information about the value of the field for a particular issue. Maybe I'm missing something obvious?

xdhmoore commented 3 years ago

It looks like the Go Worklog type defined in https://github.com/go-jira/jira/blob/master/jiradata/Worklog.go doesn't define the remaining estimate field.

xdhmoore commented 3 years ago

I have discovered that you can get the time remaining via the following:

jira view -t json <issue> | jq '.fields.timetracking'

Haven't figured out how to write to it yet... I guess the field is on the issue, not the worklog, which makes sense...