Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Invalid Usage: template: wrong type for value; expected []interface {}; got []string #494

Open
kvaradhan3 opened this issue May 3, 2023 · 0 comments

Comments

@kvaradhan3
Copy link

kvaradhan3 commented May 3, 2023

Originally posted by @lvh in #20 (comment)

I have a similar question to the comment about the commit in #20.

I created the following custom-command:

---
custom-commands:
  - name: sprint delete
    help: move issue from active sprint for project
    args:
      - name: ISSUE
        required: true
        repeat: true
    script: |
      {{jira}} req -M POST "/rest/agile/1.0/backlog/issue"  \
          '{"issues":[{{ args.ISSUE | join ","}}]}'

When I run this, I get:

~ ➜ jira sprint delete XYZ-123 
usage: jira sprint delete <ISSUE>...

move issue from active sprint for project

Global flags:
  -h, --help                   Show context-sensitive help (also try --help-long and --help-man).
  -v, --verbose ...            Increase verbosity for debugging
  -e, --endpoint=ENDPOINT      Base URI to use for Jira
  -k, --insecure               Disable TLS certificate verification
  -Q, --quiet                  Suppress output to console
      --unixproxy=UNIXPROXY    Path for a unix-socket proxy
      --socksproxy=SOCKSPROXY  Address for a socks proxy
  -u, --user=USER              user name used within the Jira service
      --login=LOGIN            login name that corresponds to the user used for authentication

Args:
  <ISSUE>

ERROR Invalid Usage: template: gojira:2:37: executing "gojira" at <",">: wrong type for value; expected []interface {}; got []string

so how why does that commit expect an []interface {} and how do I pass it that?

FWIW, my jira versions:

~ ➜ jira version         
development
~ ➜ brew info go-jira        
==> go-jira: stable 1.0.27 (bottled)
Simple jira command-line client in Go
https://github.com/go-jira/jira
/usr/local/Cellar/go-jira/1.0.27 (6 files, 8.8MB) *
  Poured from bottle on 2022-08-04 at 12:22:56
@kvaradhan3 kvaradhan3 changed the title ERROR Invalid Usage: template: gojira:2:37: executing "gojira" at <",">: wrong type for value; expected []interface {}; got []string ERROR Invalid Usage: template: wrong type for value; expected []interface {}; got []string May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant