pawelrychlik / jira-dependency-graph Goto Github PK
View Code? Open in Web Editor NEWGraph visualizer for JIRA tickets' dependencies
License: MIT License
Graph visualizer for JIRA tickets' dependencies
License: MIT License
IDs of issues linked to a given epic are not available by simply GETting that epic via the REST API. AFAIK, first we need to run a JQL search for issues that have epicLink = "my-epic"
, then build the graph from all the yielded issues.
There is a limit of 2K characters on GET requests. An equivalent POST API accepts 16K characters:
POST requests
Hi,
Noticed when I was running this script toward our Jira instant that we had fields that could be encoded in other characters that was not always within the range of ascii.
Did test out the following addition to make sure it got formatted as UTF-8 instead, which seems to work fine:
Line 99:
if islink: return '"{}\\n({})"'.format(issue_key.encode('utf-8'), summary.encode('utf-8')) return '"{}\\n({})" [href="{}", fillcolor="{}", style=filled]'.format(issue_key.encode('utf-8'), summary.encode('utf-8'), jira.get_issue_uri(issue_key).encode('utf-8'), get_status_color(status).encode('utf-8'))**
The only addition here is the .encode ('UTF-8') to overcome the error I had before regarding Ascii enconding failure.
If you think it sounds like a good option it would be nice to include
Hello:
This may be a configuration issue. May not be a bug. But I dont have a contact info. So filing the bug.
Your help is appreciated.
I installed required software and executed this command. But getting these errors
1.Do i need to set up a proxy ?
2. What is the prerequisite i should check for.
3. Should i be able to send a REST request to jira with my user id and password?
Here is my request
python jira-dependency-graph.py --user=[email protected] --password="xxxxxxx" --jira
=https://jira.oraclecorp.com OAM-25342
Fetching OAM-25342
Traceback (most recent call last):
File "jira-dependency-graph.py", line 281, in
main()
File "jira-dependency-graph.py", line 272, in main
graph = graph + build_graph_data(issue, jira, options.excludes, options.show_directions, options.directions, options.includes, options.closed, options.ignore_epic, options.ignore_subtasks, options.traverse, options.word_wrap)
File "jira-dependency-graph.py", line 199, in build_graph_data
return walk(start_issue_key, [])
File "jira-dependency-graph.py", line 149, in walk
issue = jira.get_issue(issue_key)
File "jira-dependency-graph.py", line 52, in get_issue
response.raise_for_status()
File "/usr/lib/python2.7/site-packages/requests/models.py", line 834, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found
Trying to get this set up for one of my Jira users, on Max and Linux this works great, putting it on windows was a bit more tricky but I got it working just, but when the API call to Google Charts occurs, the returned issue_graph.png is empty 👎 Any idea what could be going on?
Recursive calls to walk runs into memory issue for a big epic.
Recursion needs to be changed to use iterative processing
Hi,
First of all, thanks a lot for this tool, I find it very useful for managing dependencies across tickets.
I was wondering if the following functionality is possible: I know I can mark certain link types so they aren't shown in the graph using --exclude-link
, but this still walks the link and grabs the related tickets, which would then appear unlinked to anything else. I need the tool not to follow the excluded link at all, is there an option for this?
Many thanks!
Hi,
as already mentioned in #30 , when using jira-dependency-graph with JIRA cloud, unfortunately an HttpError 401 is received:
Traceback (most recent call last):
File "/jira/jira-dependency-graph.py", line 302, in <module>
main()
File "/jira/jira-dependency-graph.py", line 291, in main
graph = graph + build_graph_data(issue, jira, options.excludes, options.show_directions, options.directions,
File "/jira/jira-dependency-graph.py", line 207, in build_graph_data
return walk(start_issue_key, [])
File "/jira/jira-dependency-graph.py", line 157, in walk
issue = jira.get_issue(issue_key)
File "/jira/jira-dependency-graph.py", line 49, in get_issue
response.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: [..]
That's really a pity, I was so looking forward to see that dependency graph :)
Does jira-dependency-graph support Jira Cloud, Jira Server, or both?
I notice the API documentation linked is that for Jira Server. I would like to use jira-dependency-graph with Jira Cloud, but I got a 401 error when I tried. It would be helpful if the README made it clear which product(s) are supported.
Thanks!
We have localized link names to Czech using diacritics. Then script process such link name it crashes with following:
Fetching RIO-1887
RIO-1887 => souvisí s => RIO-1897
Traceback (most recent call last): File "jira-dependency-graph.py", line 286, in <module> main() File "jira-dependency-graph.py", line 277, in main options.ignore_subtasks, options.traverse, options.word_wrap) File "jira-dependency-graph.py", line 201, in build_graph_data return walk(start_issue_key, []) File "jira-dependency-graph.py", line 197, in walk walk(child, graph) File "jira-dependency-graph.py", line 189, in walk result = process_link(fields, issue_key, other_link) File "jira-dependency-graph.py", line 142, in process_link link_type, extra) UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 6: ordinal not in range(128)
$ python jira-dependency-graph.py --user=[username] --password=[password] -jira=https://[FQDN] --file=output.png OPSTEAM-2825
Fetching OPSTEAM-2825
Traceback (most recent call last):
File "jira-dependency-graph.py", line 281, in <module>
main()
File "jira-dependency-graph.py", line 272, in main
graph = graph + build_graph_data(issue, jira, options.excludes, options.show_directions, options.directions, options.includes, options.closed, options.ignore_epic, options.ignore_subtasks, options.traverse, options.word_wrap)
File "jira-dependency-graph.py", line 199, in build_graph_data
return walk(start_issue_key, [])
File "jira-dependency-graph.py", line 149, in walk
issue = jira.get_issue(issue_key)
File "jira-dependency-graph.py", line 51, in get_issue
response = self.get('/issue/%s' % key, params={'fields': self.fields})
File "jira-dependency-graph.py", line 44, in get
return requests.get(url, params=params, auth=self.auth, headers=headers, verify=(not self.no_verify_ssl))
File "/home/carl/dev/.virtualenv/lib/python2.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/home/carl/dev/.virtualenv/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/carl/dev/.virtualenv/lib/python2.7/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/carl/dev/.virtualenv/lib/python2.7/site-packages/requests/sessions.py", line 616, in send
adapter = self.get_adapter(url=request.url)
File "/home/carl/dev/.virtualenv/lib/python2.7/site-packages/requests/sessions.py", line 707, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for 'ira=https://[same FQDN]/rest/api/latest/issue/OPSTEAM-2825'
Any thoughts would be appreciated; I'm not a python dev but I do have some dev experience.
Could you add an explicit LICENSE file to the repo? Thanks.
Working with Atlassian Cloud, We must replace password by an API token, it's not clear on readme.me.
I can submit a PR if you agree, but basically is something like:
Authentication
Are you using Atlassian Cloud? use your API token instead of your account password, you can generate one following these steps:
- access https://id.atlassian.com/manage-profile/security/api-tokens
- click on "Create API token" button and save it in a safe place
(See more details about APIs auth on official page
Here's the official doc.
https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
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.