Problem with Export parameters for field_types
JoeGT opened this issue · 3 comments
Having an issue with attempting to produce an export with only a limited number of fields. (using v 0.7.5). If I update to 0.7.6 or higher than I run in to this issue - #119
Here is part of my script with various different attempts
jql = f"a valid JQL query in here"
- Get page count
issue = PROJECT.issue_count(jql)
count_issue = issue.count
page_count = issue.max_page
print("Total number of issues - " + str(count_issue) + "")
print("Number of pages required - " + str(page_count) + "")
-
Different Export options
-
Attempt to export using UI "My Defaults"
PROJECT.export_issues(jql=jql, field_type="current", page=(0, page_count), final_file=export_file) -
Attempt to export with a limited set of included files
includes = ["Summary", "Visa Products Impacted", "Created"]
PROJECT.export_issues(jql=jql, include_fields=includes, page=(0, page_count), final_file=export_file) -
Direct call to issue_export class
issue_export(jql=jql, field_type="current", page=(0, page_count), final_file=export_file)
All of these give the same result - the export runs fine but it always includes ALL fields and never the subset that I need. It feels like it is just ignoring/not honoring the field_type or include_fields parameters.
Anything else you can suggest I can do here or how to debug/troubleshoot ?
Hey @JoeGT
These arguments are only present in version 0.7.6 and later, so if the version is lower than that, nothing will occur. Regarding the issue you're encountering, you can utilize the following code to bypass the fields check, which results in a missing key.
# import statement
fields = []
jql = ...
LOGIN.api = False
issue_export(jql=jql, fields=fields)
I'll apply a fix in the upcoming version which I should release later on this week.
Thank you @princenyeche - that has resolved the issue for me from 0.7.6 or higher. Look forward to the permanent fix :)