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

Many of the --format tokens generate errors #63

Open
RichardBronosky opened this issue Nov 6, 2017 · 0 comments
Open

Many of the --format tokens generate errors #63

RichardBronosky opened this issue Nov 6, 2017 · 0 comments

Comments

@RichardBronosky
Copy link

According to jira-cli view -h

  --format FORMAT       format for displaying ticket information. allowed
                        tokens: status,priority,updated,votes,components,proje
                        ct,reporter,created,fixVersions,summary,environment,as
                        signee,key,affectsVersions,type.Use the % character
                        before each token (example: issue id: %key
                        [%priority])

However I have found that the following tokens fail: votes, components, project

Here is a transcript:

$ for t in \
           status priority updated votes components project \
           reporter created fixVersions summary environment \
           assignee key affectsVersions type;
do
    echo -e "\n\n####\n# token:$t\n####";
    jira-cli view --format="$t: %$t" ITOPS-572;
done


####
# token:status
####
status: New


####
# token:priority
####
priority: Major


####
# token:updated
####
updated: 2017-11-03T00:02:23.217-0400


####
# token:votes
####
Traceback (most recent call last):
  File "/Users/bbronosky/Library/Python/2.7/bin/jira-cli", line 11, in <module>
    load_entry_point('jira-cli==2.2', 'console_scripts', 'jira-cli')()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/interface.py", line 272, in cli
    return post_args.cmd(jira, post_args).execute()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/processor.py", line 30, in execute
    return self.eval()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/processor.py", line 75, in eval
    comments_only=self.args.comments_only
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/bridge/__init__.py", line 68, in format_issue
    ret_str = ret_str.replace(k, issue.setdefault(v.lower(),"")).encode('utf-8')
TypeError: expected a character buffer object


####
# token:components
####
Traceback (most recent call last):
  File "/Users/bbronosky/Library/Python/2.7/bin/jira-cli", line 11, in <module>
    load_entry_point('jira-cli==2.2', 'console_scripts', 'jira-cli')()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/interface.py", line 272, in cli
    return post_args.cmd(jira, post_args).execute()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/processor.py", line 30, in execute
    return self.eval()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/processor.py", line 75, in eval
    comments_only=self.args.comments_only
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/bridge/__init__.py", line 68, in format_issue
    ret_str = ret_str.replace(k, issue.setdefault(v.lower(),"")).encode('utf-8')
TypeError: expected a character buffer object


####
# token:project
####
Traceback (most recent call last):
  File "/Users/bbronosky/Library/Python/2.7/bin/jira-cli", line 11, in <module>
    load_entry_point('jira-cli==2.2', 'console_scripts', 'jira-cli')()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/interface.py", line 272, in cli
    return post_args.cmd(jira, post_args).execute()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/processor.py", line 30, in execute
    return self.eval()
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/processor.py", line 75, in eval
    comments_only=self.args.comments_only
  File "/Users/bbronosky/Library/Python/2.7/lib/python/site-packages/jiracli/bridge/__init__.py", line 68, in format_issue
    ret_str = ret_str.replace(k, issue.setdefault(v.lower(),"")).encode('utf-8')
TypeError: expected a character buffer object


####
# token:reporter
####
reporter: bbronosky


####
# token:created
####
created: 2017-11-01T14:09:52.402-0400


####
# token:fixVersions
####
fixVersions:


####
# token:summary
####
summary: Chef migration


####
# token:environment
####
environment:


####
# token:assignee
####
assignee: bbronosky


####
# token:key
####
key: ITOPS-572


####
# token:affectsVersions
####
affectsVersions:


####
# token:type
####
type: Epic
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