microsoft / microsoft/azure-devops-python-api
Fetch work item search results: usage of top and changedDate
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 684
- Forks
- 218
- Avg merge
- 8d 10h
- Merged PRs (30d)
- 1
Description
Hey there,
am trying to find matches for some keywords with fetch_work_item_search_results. Param top within WorkItemSearchRequest is limited to max. 1000, does this mean they're max. 1000 results that can be returned or max. 1000 work items that are even checked?
I'd also like to apply a filter to check only for the work items from the past week, but when adding the filter with System.ChangedDate following exception is thrown:
azure.devops.exceptions.AzureDevOpsServiceError: Unknown filter [System.ChangedDate] found.. Which filter could be used instead or is there no possibility to filter a specific timeframe without using WIQL?
sort_option = SortOption(field='system.id', sort_order='ASC')
for keyword in test_keywords:
search_request = WorkItemSearchRequest(
#filters = { 'System.ChangedDate': [ '@Today-7' ]},
search_text = keyword,
order_by = [sort_option],
skip = 0,
top = 1000,
include_facets = False
)
work_item_search_response = search_client.fetch_work_item_search_results(search_request, project=project_name)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WorkItemSearchRequest and fetch_work_item_search_results entry points shown in the issue, then consult the Azure DevOps work item search API documentation for the top limit and supported filters. Done means documenting whether top limits returned or searched items and identifying the supported way to constrain results by changed date, or clearly stating that WIQL is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- api
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100