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

Add _before parameter to History search #455

Merged
merged 9 commits into from
May 16, 2019

Conversation

feordin
Copy link
Contributor

@feordin feordin commented May 8, 2019

Description

Adds support for a new parameter: _before, for history searches

Related issues

Addresses [issue AB#68975].

Testing

Created several new E2E tests for history covering different values for _since and _before with different number of updates in history

@feordin feordin requested a review from brendankowitz May 8, 2019 06:00
@feordin feordin force-pushed the personal/jaerwin/history-before branch from 7c91f84 to 373db47 Compare May 9, 2019 18:01
@feordin feordin requested a review from hansenms May 9, 2019 18:51
Copy link
Contributor

@hansenms hansenms left a comment

Choose a reason for hiding this comment

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

I think we should remove the stuff that tries to add _before when not specified. I think unless the user adds it, all bets are off.

@@ -221,10 +222,11 @@ public async Task<IActionResult> Read(string type, string id)
public async Task<IActionResult> SystemHistory(
[FromQuery(Name = KnownQueryParameterNames.At)] PartialDateTime at,
Copy link
Contributor

Choose a reason for hiding this comment

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

Not your code, but I just realized that the at parasmeter is an instant type. Filed new bug for this.

@@ -157,7 +157,7 @@ public async Task GivenAMissingResourceId_WhenSearchingHistory_ThenAResourceNotF

_searchService.SearchImplementation = options => new SearchResult(new ResourceWrapper[0], null);

await Assert.ThrowsAsync<ResourceNotFoundException>(() => _searchService.SearchHistoryAsync(resourceType, resourceId, null, null, null, null, CancellationToken.None));
await Assert.ThrowsAsync<ResourceNotFoundException>(() => _searchService.SearchHistoryAsync(resourceType, resourceId, null, null, null, null, null, CancellationToken.None));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we add named parameter for readability?

@feordin feordin changed the title Personal/jaerwin/history before Add _before parameter to History search May 14, 2019
@feordin feordin force-pushed the personal/jaerwin/history-before branch from d355fbe to e1a0394 Compare May 14, 2019 17:40
@feordin feordin requested a review from brendankowitz May 15, 2019 01:09
@feordin feordin requested a review from brendankowitz May 15, 2019 19:56
@feordin feordin merged commit 498e75a into master May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants