The company I work for is upgrading JIRA to v7.3.6 from v6.3.12 and I'm having trouble finding answers to some questions. I am just a user, not an administrator. Here is one of the questions:
Currently I can obtain a list of components in a project and their process ID numbers by using this API call:
https://JIRA-URL/rest/api/2/issue/createmeta?projectKeys=DSCUST&expand=projects.issuetypes.fields&issuetypeName=Story
However, when I replace the version 6 JIRA-URL with the one for version 7, I get an empty json set: {"expand":"projects","projects":[]}
Research suggested that https://JIRA-URL/rest/api/2/issue/createmeta?findAllForProject(DSCUST) would provide what I needed. Although I get a long block of json code, Components that exist in the project are not listed.
The Project (DSCUST) exists and some Components have been defined.
Could someone who knows more about this than I do (and that will be just about anybody) toss me a clue?
It's easy and possible using REST APIs to get the list of project components.
Latest release -- https://docs.atlassian.com/jira/REST/server/#api/2/project-getProjectComponents
REST end point - GET /rest/api/2/project/{projectIdOrKey}/components
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bill, If you are satisfied with the answers, could you please accept them. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please use below script and replace jira URL and login details, which will generate CSV file with all projects and corresponding Components, I already used for our Jira
import csv
import jira.client
from jira.client import JIRA
options = {'server': 'http://jiratest'}
jira = JIRA(options, basic_auth=('user-id', 'password'))
projects = jira.projects()
all_components = {}
for v in projects:
all_components[v.name] = ', '.join(map(lambda x: x.name, jira.project_components(v)))
with open('output.csv','w') as myfile:
writer = csv.writer(myfile)
for key, value in all_components.items():
writer.writerow([str(key),str(value)])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not able to get the results.....
ERROR:::
File "/home/vvdn/.local/lib/python2.7/site-packages/jira/client.py", line 472, in __init__
si = self.server_info()
File "/home/vvdn/.local/lib/python2.7/site-packages/jira/client.py", line 2133, in server_info
j = self._get_json('serverInfo')
File "/home/vvdn/.local/lib/python2.7/site-packages/jira/client.py", line 2549, in _get_json
r = self._session.get(url, params=params)
File "/home/vvdn/.local/lib/python2.7/site-packages/jira/resilientsession.py", line 151, in get
return self.__verb('GET', url, **kwargs)
File "/home/vvdn/.local/lib/python2.7/site-packages/jira/resilientsession.py", line 125, in __verb
response = method(url, timeout=self.timeout, **kwargs)
File "/home/vvdn/.local/lib/python2.7/site-packages/requests/sessions.py", line 525, in get
return self.request('GET', url, **kwargs)
File "/home/vvdn/.local/lib/python2.7/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/vvdn/.local/lib/python2.7/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/home/vvdn/.local/lib/python2.7/site-packages/requests/adapters.py", line 412, in send
self.cert_verify(conn, request.url, verify, cert)
File "/home/vvdn/.local/lib/python2.7/site-packages/requests/adapters.py", line 227, in cert_verify
"invalid path: {0}".format(cert_loc))
IOError: Could not find a suitable TLS CA certificate bundle, invalid path: False
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used for test Jira and no ssl and also my Pyhton environment is 3.5 version and jira version 7.4.0
FYI, more on Jira and Pyhton interactions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.