-
Notifications
You must be signed in to change notification settings - Fork 5
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
Get-FreshServiceCustomObjectRecord filter returning one page of results #11
Comments
@rasimmers test |
What is the status of this? |
To do:
|
When reviewing what was causing the issue after reenabling the filter switch I noticed the logic of the Loop condition variable and the if statement for the filter switch was flawed because Freshservice seems to keep returning values for any page number when doing a filter for a custom object. This indeed seems like a bug but there are two different work arounds we can do. The first one is the update the IF Statement and the Loop Condition variable
By including an additional condition here and updating the initial loop condition variable to say $result.Headers.Link -like "" this will aid in the loop logic easier than saying !$result.Headers.Link
To
This resulted in it fixing the filter logic for us for custom objects. I saw something similar happen with the get-fsasset filter switch too but haven't made any changes to that yet to test. 2 We other vendors with similar API outputs that allow us to see how many records are in a result for a specific table. Freshservice previously did not provide this from what I saw last year. |
The other Modules that have the same issue with their filter looping are I was able to find these by referencing the $loopCondition Variable in any other Modules. I have confirmed that updated the asset module correct an issue where it would always warn about 40 page limit even on a empty result for a filter. |
Any updates on this? I need to use -Filter on Get-FreshServiceCustomObjectRecord, but because it's remarked out I can't use it currently :( |
Expected Behavior
Using the filter for Custom Object Record (https://api.freshservice.com/#list_all_custom_object_records) should filter records and return all pages.
Current Behavior
The Filter applies, but there is no next page link and incrementing the page does not return different results resulting in an infinite loop.
Possible Solution
Waiting on response from Freshworks development on how pagination works. Remarked -Filter parameters until remediated.
The text was updated successfully, but these errors were encountered: