Git Product home page Git Product logo

ticketutil's People

Contributors

advaitgupte04 avatar akasurde avatar archana-pandeym avatar cript0nauta avatar ddelabru avatar dmranck avatar fpob avatar k-gazdikova avatar madros9 avatar mjagelka avatar nikitabugrovsky avatar pbabinca avatar pzubaty avatar sdaley1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ticketutil's Issues

Child Ticket in RT

I'm using your library to create the tickets in RT, What i wonder is is it something possible to assign the child tickets to a parent ticket using your library ? I've tried but it didn't succeed.

ticketutil doesn't work with RH bugzilla

ERROR:root:Error authenticating to https://bugzilla.redhat.com/rest/login.
ERROR:root:404 Client Error: Not Found for url: https://bugzilla.redhat.com/rest/login?login=username&password=password
Traceback (most recent call last):
  File "create_jira_ticket.py", line 12, in <module>
    ticket_id=1447393)
  File "/home/vashirov/.local/lib/python2.7/site-packages/ticketutil/bugzilla.py", line 28, in __init__
    super(BugzillaTicket, self).__init__(project, ticket_id)
  File "/home/vashirov/.local/lib/python2.7/site-packages/ticketutil/ticket.py", line 43, in __init__
    raise TicketException("Error authenticating to {0}.".format(self.auth_url))
ticketutil.ticket.TicketException: Error authenticating to https://bugzilla.redhat.com/rest/login.

Add option to turn off all logging

Currently, you can set an environment variable called TICKETUTIL_DEBUG to True to enable debug logging. There should be a way to turn all logging off though.

JiraTicket: UnboundLocalError when using an invalid hostname

I purposely mis-typed the jira hostname and tried to connect. It threw an UnboundLocalError. Here is the traceback:

INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): fake-jira.fake.com
ERROR:root:Error authenticating to http://fake-jira.fake.com/step-auth-gss. No valid kerberos principal found.
ERROR:root:HTTPConnectionPool(host='fake-jira.fake.com', port=80): Max retries exceeded with url: /step-auth-gss (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f64a15f4b90>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (2): fake-jira.fake.com
Traceback (most recent call last):
File "utils.py", line 16, in
create_jira('DEVOPSA', 'test summary', 'test description')
File "utils.py", line 12, in create_jira
priority = priority,
File "/usr/lib/python2.7/site-packages/ticketutil/jira.py", line 75, in create
self._create_ticket_request(params)
File "/usr/lib/python2.7/site-packages/ticketutil/jira.py", line 134, in _create_ticket_request
logging.error("Error creating ticket - {0}".format(list(r.json()['errors'].values())[0]))
UnboundLocalError: local variable 'r' referenced before assignment

Ticket title to ticket id look up method?

Feature request: Pass in a ticket title and have the corresponding ticket id be returned. Maybe this could be lumped into query support? Investigate if this is worthwhile to add.

Investigate adding query support

Investigate adding support for querying tickets in a project based on certain parameters. For example, return all open tickets, or return all tickets assigned to a specific user.

Support for personal access tokens

With the Jira LTS release 8.20 the Jira is supporting Personal Access Tokens, we need to support personal access tokens for Jira. The Basic auth will no more be supported for many Jira applications with this release.

More details: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
Possible solution(s)

Details about personal access tokens: More details: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

Is it necessary to have requests>=2.9.1?

When working on RHEL 7.3 it's kinda difficult to get ticketutil going because of its strict dependency on requests>=2.9.1. RHEL ships v2.6.0 and upgrading with pip messes up system certificates. Is it really necessary to have requests 2.9.1 or would it be possible to bump it down to 2.6? It would make my life significantly easier.

Logging should not use basicConfig

basicConfig sets up root logger which means it pollutes logging of other parts of applications and means apps cannot control whether they care about level of ticketutil logging.

Instead ticketutil should do something like:

logger = logging.getLogger(__name__)
logger.setLevel(XYZ)
....
logger.info/debug() etc

Cannot initialize a JiraTicket object if the Jira URL has a trailing slash

If the provided Jira URL has a trailing slash, initializing a JiraTicket object results in an incorrectly formed API URL, and ultimately leads to a JSONDecodeError. The resulting traceback does not indicate that the trailing slash could be the problem. The workaround for this behavior is easy (omit the trailing slash), but pinpointing the cause of the traceback can be difficult.

Check methods for RedmineTicket

I created my own developer admin instance on http://m.redmine.org/hostings/new for Redmine testing purposes and I discovered, that some RedmineTicket methods are not working properly:

  • change_status() does not work, the status is not changed despite successful status code 200 being returned
  • both add_watcher() and remove_watcher() fail, because inaccessible authentication is required. This is strange as I used my admin auth. Authentication is required even when accessing http://domain.m.redmine.org/users.json directly via browser, pop up authentication window shows up not accepting my login.

These problems might be unique for this particular instance, but it would be good to inspect the user experience in this matter. Methods create(), edit(), add_comment() and add_attachment() seem to work as expected.

Run unit tests for new PRs

Now that we have unit tests for all files in ticketutil, we should be running these whenever a new PR is opened.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.