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

feature: Add created date time to filter #4932

Conversation

bbenameur
Copy link
Contributor

@bbenameur bbenameur commented Feb 12, 2024

Issue: #4937
Need:

Current:
At the endpoint elsa/api/workflow-instances currently return all workflow instances even we have millions of instances !!

Target:
Add two properties to filters, FromCreatedAt and ToCreatedAt to help us to get instances between 2 date times.

@bbenameur
Copy link
Contributor Author

@sfmskywalker

@bbenameur bbenameur force-pushed the feature/workflow-instances-list-date-filters branch 2 times, most recently from b756754 to dc92c5e Compare February 14, 2024 14:46
@bbenameur bbenameur force-pushed the feature/workflow-instances-list-date-filters branch from dc92c5e to 349bb51 Compare February 16, 2024 10:13
@bbenameur
Copy link
Contributor Author

Hello @sfmskywalker, do you have any questions about this PR?
Sorry, I can't add reviewers maby i dont have permissions.

@sfmskywalker
Copy link
Member

Hi @bbenameur , not yet - I just haven't found the time to go over it :)

Copy link
Member

@sfmskywalker sfmskywalker left a comment

Choose a reason for hiding this comment

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

Very good, thanks!

@sfmskywalker sfmskywalker added enhancement New feature or request elsa 3 This issue is specific to Elsa 3 labels Feb 17, 2024
@sfmskywalker sfmskywalker added this to the Elsa 3.1 milestone Feb 17, 2024
@sfmskywalker sfmskywalker merged commit f7e224e into elsa-workflows:main Feb 17, 2024
1 check passed
@bbenameur bbenameur deleted the feature/workflow-instances-list-date-filters branch February 18, 2024 12:54
@sfmskywalker
Copy link
Member

Hi @bbenameur , just a quick heads up: we are about to merge this PR that changes the API a bit. In summary, it offers more options to filter by date ranges, including CreatedAt (which you added via your PR), UpdatedAt and FinishedAt, on top of a few more filters.

This will change the API in the following way (example):

https://localhost:5001/elsa/api/workflow-instances?TimestampFilters=[{"Column": "CreatedAt", "Operator": 1, "Timestamp": "2024-02-16T00:00:00"}]

Notice that for the date ranges, we now have to provide a TimestampFilters parameter when using GET requests.
The API was updated to also support POST requests, which makes it simpler to post these filters.

Please let me know if you have any questions or concerns about this upcoming change.

Thanks again for your contributions!

@bbenameur
Copy link
Contributor Author

Hello, @sfmskywalker ia agree is the best and flexible way, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elsa 3 This issue is specific to Elsa 3 enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants