From 39137269917f32897a2cb2ea49b5308618d78eb2 Mon Sep 17 00:00:00 2001 From: Cory Bennett Date: Tue, 19 Sep 2017 00:27:11 -0700 Subject: [PATCH] update edit command to set queryFields on search to match what is used in template --- jiracli/templates.go | 5 +++-- jiracmd/edit.go | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jiracli/templates.go b/jiracli/templates.go index f11b145..234cd28 100644 --- a/jiracli/templates.go +++ b/jiracli/templates.go @@ -326,7 +326,7 @@ comments: {{end -}} ` const defaultEditTemplate = `{{/* edit template */ -}} -# issue: {{ .key }} +# issue: {{ .key }} - created: {{ .fields.created | age}} ago update: comment: - add: @@ -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}} diff --git a/jiracmd/edit.go b/jiracmd/edit.go index 986e3da..635a6f9 100644 --- a/jiracmd/edit.go +++ b/jiracmd/edit.go @@ -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 {