skip to Main Content

I have an Azure DevOps API for fetching the releases between the start date and the end date

https://vsrm.dev.azure.com/${organization}/${project}/_apis/release/releases?minCreatedTime=${startDate}&maxCreatedTime=${endDate}&api-version=6.0,

startDate : 2024-05-27,
endDate : 2024-07-11

Basically, when I run this API it gives the releases which contain the release id
so I have passed the release id to another API to fetch the workitems

https://vsrm.dev.azure.com/${organization}/${project}/_apis/release/releases/${releaseId}/workitems?api-version=7.1

When I run this API, the work items associated with each release ID are incorrect. On 2024-07-15, the API returned 440 work items, which is accurate. However, when I ran the same API on 2024-07-16, it only returned 215 work items. I am not receiving the same work items; the API is showing fewer work items.

could anyone help me out from this case

When I run this API, the work items associated with each release ID are incorrect. On 2024-07-15, the API returned 440 work items, which is accurate. However, when I ran the same API on 2024-07-16, it only returned 215 work items. I am not receiving the same work items; the API is showing fewer work items.

I am expecting the resolution such that it should contains all the workitems in the release

2

Answers


  1. Chosen as BEST ANSWER

    Thank you for the reply

    Just now I found that the resolution is : In the Azure DevOps pipeline, we have the release retention period so as soon as the retention period expires the releases that are there in the release pipeline will be deleted

    so we need to increase the release retention period


  2. When I run this API, the work items associated with each release ID are incorrect. On 2024-07-15, the API returned 440 work items, which is accurate. However, when I ran the same API on 2024-07-16, it only returned 215 work items. I am not receiving the same work items; the API is showing fewer work items.

    The two rest api could have different output if you run one day after.

    For 1st rest api, when you get all releases in duration, it could happen that some releases were deleted(manually or by retained policy) in the day, the rest api won’t list the deleted releases. Hence it could get less release id to 2nd rest api.

    Removed a release and get different release number for same rest api on my side:

    enter image description here

    Same for 2nd rest api, if some associated work items were deleted, when you run again, it will be not listed in the rest api.

    Deleted the associated work item, it won’t be listed again on my side.

    enter image description here

    I am expecting the resolution such that it should contains all the workitems in the release

    Actually you are doing in the correct way, but need to make sure there’s no change on the release number and no work items deleted, to make sure you have same output between two runs. You can output the release id and work item id for confirmation.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search