Skip to content

Commit a7e4aed

Browse files
authored
[Integration][ADO] wiql base query update (#1142)
1 parent 9fae538 commit a7e4aed

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

integrations/azure-devops/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
<!-- towncrier release notes start -->
99

10+
## 0.1.83 (2024-11-12)
11+
12+
13+
### Improvements
14+
15+
- Updated wiql base query to use immutable fields for fetching work items related to a project
16+
17+
1018
## 0.1.82 (2024-11-12)
1119

1220

1321
### Improvements
1422

23+
1524
- Bumped ocean version to ^0.13.1
1625

1726

integrations/azure-devops/azure_devops/client/azure_devops_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Maximum number of work item IDs allowed in a single API request
2222
# (based on Azure DevOps API limitations) https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/list?view=azure-devops-rest-7.1&tabs=HTTP
2323
MAX_WORK_ITEMS_PER_REQUEST = 200
24-
MAX_WORK_ITEMS_RESULTS_PER_PROJECT = 20000
24+
MAX_WORK_ITEMS_RESULTS_PER_PROJECT = 19999
2525

2626

2727
class AzureDevopsClient(HTTPBaseClient):
@@ -190,9 +190,7 @@ async def _fetch_work_item_ids(self, project: dict[str, Any]) -> list[int]:
190190
:return: A list of work item IDs.
191191
"""
192192
config = typing.cast(AzureDevopsWorkItemResourceConfig, event.resource_config)
193-
wiql_query = (
194-
f"SELECT [Id] from WorkItems WHERE [System.AreaPath] = '{project['name']}'"
195-
)
193+
wiql_query = f"SELECT [Id] from WorkItems WHERE [System.TeamProject] = '{project['name']}'"
196194

197195
if config.selector.wiql:
198196
# Append the user-provided wiql to the WHERE clause

integrations/azure-devops/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "azure-devops"
3-
version = "0.1.82"
3+
version = "0.1.83"
44
description = "An Azure Devops Ocean integration"
55
authors = ["Matan Geva <matang@getport.io>"]
66

0 commit comments

Comments
 (0)