princenyeche / jiraone

A REST API Implementation to Jira Cloud APIs for creating reports and for performing other Jira queries.
https://jiraone.readthedocs.io
MIT License
25 stars 11 forks source link

Problem with Export parameters for field_types #120

Closed JoeGT closed 8 months ago

JoeGT commented 11 months ago

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 - https://github.com/princenyeche/jiraone/issues/119

Here is part of my script with various different attempts

jql = f"a valid JQL query in here"

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) + "")

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 ?

princenyeche commented 11 months ago

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.

JoeGT commented 11 months ago

Thank you @princenyeche - that has resolved the issue for me from 0.7.6 or higher. Look forward to the permanent fix :)

princenyeche commented 11 months ago

Hey @JoeGT the fix is out on #115 with some other improvements.