Skip to content

Commit

Permalink
UPDATE README with link to readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmranck committed Jun 29, 2017
1 parent e186ccc commit bd5d823
Showing 1 changed file with 11 additions and 56 deletions.
67 changes: 11 additions & 56 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Simplify all of your ticketing operations with ticketutil:
.. code-block:: python
from ticketutil.jira import JiraTicket
t = JiraTicket(<jira_url>, <project_key>, auth='kerberos')
ticket = JiraTicket(<jira_url>, <project_key>, auth='kerberos')
# Create a ticket and perform some common ticketing operations.
t.create(summary='Ticket summary',
description='Ticket description')
t.add_comment('Test Comment')
t.change_status('Done')
t = ticket.create(summary='Ticket summary',
description='Ticket description')
t = ticket.add_comment('Test Comment')
t = ticket.change_status('Done')
# Close Requests session.
t.close_requests_session()
ticket.close_requests_session()
Installation
------------
Expand All @@ -47,56 +47,11 @@ If not installing with pip, a short list of packages defined in the
requirements.txt file need to be installed. To install the required
packages, type ``pip install -r requirements.txt``.

Usage
-----

The general usage workflow for creating new tickets is:

* Create a JiraTicket, RTTicket, RedmineTicket, BugzillaTicket
or ServiceNowTicket object with ``<url>``, ``<project>`` and ``<auth>``. This
verifies that you are able to properly authenticate to the ticketing tool.
To use HTTP Basic Authentication, the ``<auth>`` parameter should contain the
username and password specified as a tuple. For tools that support kerberos
authentication (JIRA and RT), the ``<auth>`` parameter should contain
'kerberos'.
* Create a ticket with the ``create()`` method. This sets the ``ticket_id``
instance variable, allowing you to perform more tasks on the ticket.
* Add comments, edit ticket fields, add watchers, change the ticket
status, etc on the ticket.
* Close ticket Requests session with ``close_requests_session()``.

To work on existing tickets, you can also pass in a fourth parameter
when creating a Ticket object: ``<ticket_id>``. The general workflow for
working with existing tickets is as follows:

* Create a JiraTicket, RTTicket, RedmineTicket, BugzillaTicket
or ServiceNowTicket object with ``<url>``, ``<project_key>``, ``<auth>`` and
``<ticket_id>``.
* Add comments, edit ticket fields, add watchers, change the ticket
status, etc on the ticket.
* Close ticket Requests session with ``close_requests_session()``.

There is also a ``set_ticket_id()`` method for a Ticket object. This is
useful if you are working with a Ticket object that already has the
``<ticket_id>`` instance variable set, but would like to begin working
on a separate ticket. Instead of creating a new Ticket object, you can
simply pass an existing ``<ticket_id>`` in to the ``set_ticket_id()``
method to begin working on another ticket.

To return the current Ticket object's ticket_id or ticket_url, use the
``get_ticket_id()`` or ``get_ticket_url()`` methods.

To run unit tests in Bash terminal use this command:
``python3 -m unittest discover ./tests/``

See the docstrings in the code or the tool-specific files in the docs
and examples directories for more information.

Note on logging: To enable debug logging for ticketutil, set an environment
variable named TICKETUTIL_LOG_LEVEL to 'DEBUG'. You may specify the following
log levels using this environment variable: DEBUG, INFO, WARNING, ERROR,
CRITICAL. If this environment variable does not exist, the log level will be
set to INFO by default.
Documentation
-------------

Documentation for ticketutil is available at:
http://ticketutil.readthedocs.io.

Comments? / Questions? / Coming Soon
------------------------------------
Expand Down

0 comments on commit bd5d823

Please sign in to comment.