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

CUT-4040: Limit Param for DI Functions #75

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

gweinjc
Copy link
Contributor

@gweinjc gweinjc commented Jun 6, 2024

Issues

  • CUT-4040 - Limit Param for DI Functions

What does this solve?

The limit and skip params are being stripped in the DirectoryInsights module in favor of auto-pagination for results. With the reintroduction of the limit param, this will allow for manually setting limits which will save time in fetching results and will also allow for more precise filtering. If no limit param is specified, the function will automatically auto-paginate as it did previously

Is there anything particularly tricky?

NA

How should this be tested?

  1. Run Get-JcSdkEvent -Service:('all') -StartTime:((Get-date).AddDays(-7)) -Limit 1 -Sort:("DESC")
  2. Validate that it will error stating there is no parameter Limit
  3. Run (Get-JcSdkEvent -Service:('all') -StartTime:((Get-date).AddDays(-7)) -Sort:("DESC")).Count
  4. Validate that events results are returned
  5. Import the local DI psd1
  6. Run Get-JcSdkEvent -Service:('all') -StartTime:((Get-date).AddDays(-30)) -Limit 1 -Sort:("DESC")
  7. Validate that only 1 event is returned
  8. Run (Get-JcSdkEvent -Service:('all') -StartTime:((Get-date).AddDays(-7)) -Sort:("DESC")).Count
  9. Validate that the same result count is returned as step 3

Screenshots

@gweinjc gweinjc added patch Patch SDK Release Version SDK SDK Release Label labels Jun 6, 2024
@gweinjc gweinjc requested review from jworkmanjc and kmaranionjc June 6, 2024 15:17
Copy link
Contributor

@jworkmanjc jworkmanjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with my org, auto pagination still works and limit is restored! Approved

Copy link
Contributor

@kmaranionjc kmaranionjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my org, great work!
image

@gweinjc gweinjc merged commit 165b583 into master Jun 6, 2024
12 of 14 checks passed
@gweinjc gweinjc deleted the CUT-4040_LimitParamForDIFunctions branch June 6, 2024 20:45
@gweinjc gweinjc temporarily deployed to PublishToPSGallery June 6, 2024 20:46 — with GitHub Actions Inactive
@gweinjc gweinjc temporarily deployed to PublishToPSGallery June 6, 2024 20:56 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch SDK Release Version SDK SDK Release Label
Development

Successfully merging this pull request may close these issues.

3 participants