Skip to content

Commit

Permalink
update edit command to set queryFields on search to match what is use…
Browse files Browse the repository at this point in the history
…d in template
  • Loading branch information
coryb committed Sep 19, 2017
1 parent 0ba8aa0 commit 3913726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jiracli/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ comments:
{{end -}}
`
const defaultEditTemplate = `{{/* edit template */ -}}
# issue: {{ .key }}
# issue: {{ .key }} - created: {{ .fields.created | age}} ago
update:
comment:
- add:
Expand Down Expand Up @@ -354,7 +354,8 @@ fields:
priority: # Values: {{ range .meta.fields.priority.allowedValues }}{{.name}}, {{end}}
name: {{ or .overrides.priority .fields.priority.name "" }}{{end}}
description: |~
{{ or .overrides.description (or .fields.description "") | indent 4 }}
{{ or .overrides.description .fields.description "" | indent 4 }}
# votes: {{ .fields.votes.votes }}
# comments:
# {{ range .fields.comment.comments }} - | # {{.author.name}}, {{.created | age}} ago
# {{ or .body "" | indent 4 | comment}}
Expand Down
3 changes: 3 additions & 0 deletions jiracmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func CmdEditRegistry() *jiracli.CommandRegistryEntry {
"Edit issue details",
func(fig *figtree.FigTree, cmd *kingpin.CmdClause) error {
jiracli.LoadConfigs(cmd, fig, &opts)
if opts.QueryFields == "" {
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated,issuetype,comments,description,votes,created,customfield_10110,components"
}
return CmdEditUsage(cmd, &opts, fig)
},
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
Expand Down

0 comments on commit 3913726

Please sign in to comment.