microsoft / microsoft/azure-devops-python-api

Fetch work item search results: usage of top and changedDate

Aperta
#385 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
684
Fork
218
Merge medio
8g 10h
PR unite (30g)
1

Descrizione

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)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dagli entry point WorkItemSearchRequest e fetch_work_item_search_results mostrati nell’issue, quindi consulta la documentazione dell’Azure DevOps work item search API relativa al limite di top e ai filtri supportati. Il lavoro è completato quando viene documentato se top limita gli elementi restituiti o quelli cercati e viene identificato il modo supportato per limitare i risultati in base alla data di modifica, oppure viene dichiarato chiaramente che è richiesto WIQL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, python
Ambito
api
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.