Skip to content

feat: Add filterType property to work item and work item template APIs models - #228

Merged
gokulprasanth-ni merged 7 commits into
masterfrom
users/gokulprasanthRavi/add-filter-type-support-to-workitems-client
Sep 23, 2026
Merged

gokulprasanth-ni merged 7 commits into
masterfrom
users/gokulprasanthRavi/add-filter-type-support-to-workitems-client

Conversation

@gokulprasanth-ni

Copy link
Copy Markdown
Contributor

What does this Pull Request accomplish?

Add filterType property to resource models in work item and template APIs

Why should this Pull Request be merged?

This support makes it easier for the users to create work items with either Linq or Lucene resource filters

What testing has been done?

Automated integration tests are included.

Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is additive, follows existing JsonModel camelCase serialization conventions, and includes integration test coverage plus updated examples for the new field.

Pull request overview

Adds a filterType/filter_type field to Work Item and Work Item Template resource models so callers can explicitly indicate whether resource filters are interpreted as LINQ or LUCENE, and updates integration tests/examples to exercise and document the new behavior.

Changes:

  • Introduces FilterType enum and adds filter_type to ResourcesDefinition and TemplateResourcesDefinition (serialized as filterType).
  • Extends query projection enums with RESOURCES_FILTER_TYPE for both work items and templates.
  • Updates integration tests and examples to set and validate filter_type (and adjusts sample filter strings accordingly).
File summaries
File Description
tests/integration/work_item/test_work_item_client.py Adds integration coverage for create/update/query behaviors involving resources.filter_type and updates sample filters.
nisystemlink/clients/work_item/models/_resources_definition.py Adds FilterType enum plus filter_type fields to resource definition models.
nisystemlink/clients/work_item/models/_query_work_items_request.py Adds WorkItemField.RESOURCES_FILTER_TYPE projection field.
nisystemlink/clients/work_item/models/_query_work_item_templates_request.py Adds WorkItemTemplateField.RESOURCES_FILTER_TYPE projection field.
nisystemlink/clients/work_item/models/init.py Exports FilterType from the public models package.
examples/work_item/work_items.py Demonstrates setting filter_type for work item create/update resource filters.
examples/work_item/work_item_templates.py Demonstrates setting filter_type for template resource filters and updates.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread nisystemlink/clients/work_item/models/_resources_definition.py Outdated
Comment thread nisystemlink/clients/work_item/models/_resources_definition.py Outdated
Comment thread examples/work_item/work_items.py Outdated
Comment thread examples/work_item/work_items.py Outdated
Comment thread tests/integration/work_item/test_work_item_client.py
Comment thread tests/integration/work_item/test_work_item_client.py Outdated
gokulprasanth-ni added 5 commits September 21, 2026 23:13
Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>
Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>
Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>
Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>
Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>
@gokulprasanth-ni
gokulprasanth-ni marked this pull request as ready for review September 21, 2026 18:11
Comment thread examples/work_item/work_item_templates.py Outdated
Signed-off-by: gokulprasanth-ni <gokulprasanth.ravi@emerson.com>
@gokulprasanth-ni
gokulprasanth-ni merged commit eeba89b into master Sep 23, 2026
14 checks passed
@gokulprasanth-ni
gokulprasanth-ni deleted the users/gokulprasanthRavi/add-filter-type-support-to-workitems-client branch September 23, 2026 12:48
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.

4 participants