From fce78dea68b62c2a7d14757ccb56b03a182b5a98 Mon Sep 17 00:00:00 2001 From: Cory Bennett Date: Fri, 1 Sep 2017 23:29:54 -0700 Subject: [PATCH] use correct variables --- jiracli/block.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jiracli/block.go b/jiracli/block.go index 30be601..9541cdf 100644 --- a/jiracli/block.go +++ b/jiracli/block.go @@ -14,8 +14,6 @@ import ( type BlockOptions struct { GlobalOptions `yaml:",inline" json:",inline" figtree:",inline"` jiradata.LinkIssueRequest `yaml:",inline" json:",inline" figtree:",inline"` - Blocker string `yaml:"blocker,omitempty" json:"blocker,omitempty"` - Issue string `yaml:"issue,omitempty" json:"issue,omitempty"` } func CmdBlockRegistry(fig *figtree.FigTree, o *oreo.Client) *CommandRegistryEntry { @@ -69,12 +67,12 @@ func CmdBlock(o *oreo.Client, opts *BlockOptions) error { return err } - fmt.Printf("OK %s %s/browse/%s\n", opts.Issue, opts.Endpoint.Value, opts.Issue) - fmt.Printf("OK %s %s/browse/%s\n", opts.Blocker, opts.Endpoint.Value, opts.Blocker) + fmt.Printf("OK %s %s/browse/%s\n", opts.InwardIssue.Key, opts.Endpoint.Value, opts.InwardIssue.Key) + fmt.Printf("OK %s %s/browse/%s\n", opts.OutwardIssue.Key, opts.Endpoint.Value, opts.OutwardIssue.Key) if opts.Browse.Value { - if err := CmdBrowse(&BrowseOptions{opts.GlobalOptions, opts.Issue}); err != nil { - return CmdBrowse(&BrowseOptions{opts.GlobalOptions, opts.Blocker}) + if err := CmdBrowse(&BrowseOptions{opts.GlobalOptions, opts.InwardIssue.Key}); err != nil { + return CmdBrowse(&BrowseOptions{opts.GlobalOptions, opts.OutwardIssue.Key}) } }