Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ jiracli.egg-info/
build
AUTHORS
ChangeLog
.tox
.idea
installed_files.txt
.tox
12 changes: 9 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ Installation

* or directly from the extracted source::

python setup.py install
python setup.py install --record installed_files.txt

Uninstallation
==============

* cat installed_files.txt | xargs rm -rf

Configuration
=============
Expand All @@ -45,9 +50,10 @@ Try the help with::

Example: create a new issue:
----------------------------
The following command creates a new issue for the project PROJECT. Issue type is `Dev Bug`, labels are `abc` and `def` and components are `xxx` and `yyyy`::
The following command creates a new issue for the project PROJECT. Issue type is `Dev Bug`, labels are `abc` and `def` and components are `xxx` and `yyyy`.
A new addition is the `assignee` field where you can directly assign an issue.

./jiracli -c PROJECT "Dev Bug" "my test summary" "abc,def" "xxx,yyyy"
./jiracli -c PROJECT "Dev Bug" "my test summary" "abc,def" "xxx,yyyy" "assignee"


Example: show a single issue:
Expand Down
12 changes: 10 additions & 2 deletions jiracli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ def parse_args():
help='disable colorful output (default: %(default)s)')
group_issue = parser.add_argument_group('issue')
# create
group_issue.add_argument('-c', '--issue-create', nargs=5,
group_issue.add_argument('-c', '--issue-create', nargs=6,
metavar=('project-key', 'issue-type',
'summary', 'labels', 'components'),
'summary', 'labels', 'components', 'assignee'),
help='create a new issue. "labels" can be a '
'single label or a comma seperated list of '
'labels. "components" can be a comma seperated '
Expand Down Expand Up @@ -600,6 +600,7 @@ def main():
'summary': args['issue_create'][2],
'description': desc,
}
assignee = '';

if len(args['issue_create'][3]) > 0:
issue_dict['labels'] = args['issue_create'][3].split(',')
Expand All @@ -608,10 +609,17 @@ def main():
issue_dict['components'] = [
{'name': c} for c in args['issue_create'][4].split(',')]

if len(args['issue_create'][5]) > 0:
assignee = args['issue_create'][5]

if args['issue_parent']:
issue_dict['parent'] = {'id': args['issue_parent']}

new_issue = jira_obj.create_issue(fields=issue_dict)

if len(assignee) > 0:
new_issue.update(assignee={'name': assignee})

issue_list_print(jira_obj, [new_issue], True, True, False, False)
sys.exit(0)

Expand Down