Parent Key and Organization issues not found in Jira Issues using JQL

Parent Key and Organization issues not found in Jira Issues using JQL, I try to created a DataFrame using the following script but is there any problem with Parent Key and Organization;

issues = pd.DataFrame()
myList = [ ]
for issue in jira_issues: 
    d = {
        'Account ID': issue.fields.customfield_10088,
        'Issue Type': issue.fields.issuetype.name,
        'Parent key': issue.parent,
        'IssueKey':  issue.key,  
        'Summary': issue.fields.summary,
        'Assignee': issue.fields.assignee,
        'Reporter': issue.fields.reporter,
        'Priority': issue.fields.priority,
        'Status': issue.fields.status.name,
        'Resolution': issue.fields.resolution,
        'Created' : issue.fields.created,
        'Updated' : issue.fields.updated,
        'Resolved': issue.fields.resolutiondate,
        'Organization': issue.fields.customfield_10014,
        'Request Type': issue.fields.customfield_10014,
        'VS Client' : issue.fields.customfield_10086,
        'VS Type' : issue.fields.customfield_10098,
        'Client Type' : issue.fields.customfield_10099.value,
        'IT System' : issue.fields.customfield_10096,
        'Time to first response': issue.fields.customfield_10021,
        'Time to resolution': issue.fields.customfield_10020,   
        }  
    myList.append(d)
    #issues = issue.append(d, ignore_index=True)  
issues = pd.DataFrame(myList)

Hi @GiovanniSolano,

In order to have a better understanding, can you share a snippet as to what jira_issues looks like and where did it come from?

Assuming that jira_issues is the issues from Search, the parent key can be seen like:

{
  "expand": "schema,names",
  "startAt": 0,
  "maxResults": 50,
  "total": 9,
  "issues": [
    {
      "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
      "id": "10004",
      "self": "http://localhost:2990/jira/rest/api/2/issue/10004",
      "key": "TEST-5",
      "fields": {
        "parent": {
          "id": "10000",
          "key": "TEST-1",
          "self": "http://localhost:2990/jira/rest/api/2/issue/10000",...

With the sample above, getting the parent key is not issue.parent (but should be issue.fields.parent.key?). Do note that the parent field is not present for non-sub-tasks.

For the organization, is customfield_10014 really the organization field? Based on your code snippet, Organization and Request Type are getting the values from the same custom field which does not seem correct.

In order to make sure what field is for organizations, try using Get fields API and then update your script accordingly.

Hope this helps.

Ian