Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Export parameters for field_types #120

Closed
JoeGT opened this issue Dec 19, 2023 · 3 comments
Closed

Problem with Export parameters for field_types #120

JoeGT opened this issue Dec 19, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@JoeGT
Copy link

JoeGT commented Dec 19, 2023

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 ?

@princenyeche princenyeche self-assigned this Dec 19, 2023
@princenyeche princenyeche added the question Further information is requested label Dec 19, 2023
@princenyeche
Copy link
Owner

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
Copy link
Author

JoeGT commented Dec 19, 2023

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

@princenyeche
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants