mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
tweaks for templates in named queries to work better
This commit is contained in:
+3
-3
@@ -5,7 +5,7 @@ endpoint: https://go-jira.atlassian.net
|
||||
user: admin
|
||||
|
||||
queries:
|
||||
todo: |-
|
||||
todo: |
|
||||
resolution = unresolved {{if .project}}AND project = '{{.project}}'{{end}} AND status = 'To Do'
|
||||
progress: |-
|
||||
resolution = unresolved {{if .project}}AND project = '{{.project}}'{{end}} AND status = 'In Progress'
|
||||
open: |
|
||||
resolution = unresolved {{if .project}}AND project = '{{.project}}'{{end}} AND status = 'Open'
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ func CmdEditUsage(cmd *kingpin.CmdClause, opts *EditOptions, fig *figtree.FigTre
|
||||
jiracli.EditorUsage(cmd, &opts.CommonOptions)
|
||||
jiracli.TemplateUsage(cmd, &opts.CommonOptions)
|
||||
cmd.Flag("noedit", "Disable opening the editor").SetValue(&opts.SkipEditing)
|
||||
cmd.Flag("named-query", "The name of a query in the `queries` configuration").Short('n').Action(func(ctx *kingpin.ParseContext) error {
|
||||
cmd.Flag("named-query", "The name of a query in the `queries` configuration").Short('n').PreAction(func(ctx *kingpin.ParseContext) error {
|
||||
name := jiracli.FlagValue(ctx, "named-query")
|
||||
if query, ok := opts.Queries[name]; ok && query != "" {
|
||||
var err error
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ func CmdListUsage(cmd *kingpin.CmdClause, opts *ListOptions, fig *figtree.FigTre
|
||||
cmd.Flag("issuetype", "Issue type to search for").Short('i').StringVar(&opts.IssueType)
|
||||
cmd.Flag("limit", "Maximum number of results to return in search").Short('l').IntVar(&opts.MaxResults)
|
||||
cmd.Flag("project", "Project to search for").Short('p').StringVar(&opts.Project)
|
||||
cmd.Flag("named-query", "The name of a query in the `queries` configuration").Short('n').Action(func(ctx *kingpin.ParseContext) error {
|
||||
cmd.Flag("named-query", "The name of a query in the `queries` configuration").Short('n').PreAction(func(ctx *kingpin.ParseContext) error {
|
||||
name := jiracli.FlagValue(ctx, "named-query")
|
||||
if query, ok := opts.Queries[name]; ok && query != "" {
|
||||
var err error
|
||||
|
||||
@@ -14,17 +14,17 @@ type SearchProvider interface {
|
||||
}
|
||||
|
||||
type SearchOptions struct {
|
||||
Assignee string
|
||||
Query string
|
||||
QueryFields string
|
||||
Project string
|
||||
Component string
|
||||
IssueType string
|
||||
Watcher string
|
||||
Reporter string
|
||||
Status string
|
||||
Sort string
|
||||
MaxResults int
|
||||
Assignee string `yaml:"assignee,omitempty" json:"assignee,omitempty"`
|
||||
Query string `yaml:"query,omitempty" json:"query,omitempty"`
|
||||
QueryFields string `yaml:"query-fields,omitempty" json:"query-fields,omitempty"`
|
||||
Project string `yaml:"project,omitempty" json:"project,omitempty"`
|
||||
Component string `yaml:"component,omitempty" json:"component,omitempty"`
|
||||
IssueType string `yaml:"issue-type,omitempty" json:"issue-type,omitempty"`
|
||||
Watcher string `yaml:"watcher,omitempty" json:"watcher,omitempty"`
|
||||
Reporter string `yaml:"reporter,omitempty" json:"reporter,omitempty"`
|
||||
Status string `yaml:"status,omitempty" json:"status,omitempty"`
|
||||
Sort string `yaml:"sort,omitempty" json:"sort,omitempty"`
|
||||
MaxResults int `yaml:"max-results,omitempty" json:"max-results,omitempty"`
|
||||
}
|
||||
|
||||
func (o *SearchOptions) ProvideSearchRequest() *jiradata.SearchRequest {
|
||||
|
||||
Reference in New Issue
Block a user