dmranck / ticketutil Goto Github PK
View Code? Open in Web Editor NEWPython ticketing utility for working with tickets in popular tools
License: GNU General Public License v3.0
Python ticketing utility for working with tickets in popular tools
License: GNU General Public License v3.0
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.
Bugzilla 5 supports kerberos auth, for example https://beta-bugzilla.redhat.com/ already has it.
As $subject, User should be able to create Sub Task of given task.
Service Now users want to be able to list the tickets they own so they can find the ticket ID they want to edit/comment/close. A **kwargs
method would probably be the most useful. For example:
search(assigned_to='[email protected]')
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.
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.
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
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 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.
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
I need to move tickets from one sprint to another.
Can you share an example if this is possible?
It would be nice if the library will support Jira instances that require proxy setup.
Possible solution(s):
https://docs.python-requests.org/en/latest/user/advanced/#proxies
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.
TicketUtil currently supports:
Add support for more authentication methods.
As $subj, can we have support for trac tickets as well.
ticketutil/ticketutil/servicenow.py
Line 95 in 4e71305
Apparently this can be done in ServiceNow and JIRA. Research if it can be done in other tools, and add support.
Being worked on by @pzubaty
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
Write unit tests.
Most methods in ticketutil should return something, not just log the output or response. This would allow you to programmatically see the result of previous statements.
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.
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:
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.
Now that we have unit tests for all files in ticketutil, we should be running these whenever a new PR is opened.
I want to reopen few of my jira tickets and I am trying to use
https://ticketutil.readthedocs.io/en/latest/JIRA.html#change-status
could you please provide an example if it's supported?
Add a feature that returns info on a ticket - something like a get_ticket_info() method.
As discussed in DEVOPSA-2649, ServiceNowTicket is pulling whole table when authenticating. This takes 61 seconds in production which causes timeouts and performance issues. Faster way is to pick random record instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.