question

RAMSANKARMANTRY-2193 avatar image
0 Votes"
RAMSANKARMANTRY-2193 asked RAMSANKARMANTRY-2193 commented

VersionControlServer.QueryHistory is not working when username is null with date range

Hi

I am using the VersionControlServer.QueryHistory method to find the list of changesets committed by all users within a specific date range.
Below is my code snippet.

 private void QueryChangesetByFromToDate(ref IEnumerable changesets)
         {
             changesets = this.versionControlServer.QueryHistory(
                        "$/",
                        VersionSpec.Latest,
                        0,
                        RecursionType.Full,
                        null,
                        FromDateVersion,
                        ToDateVersion,
                        Int32.MaxValue,
                        true,
                        false);
         }

This API is not working as expected. It is giving me all the changesets instead of those who are committed within the date range.

Note: This API is working fine incase I am giving user name.
The same API is also working when I am giving range of two chageset IDs.

Can someone help here ?
Thanks.





dotnet-csharp
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you show the values for FromDateVersion and ToDateVersion?

0 Votes 0 ·

Hi Paul,
The FromDateVersion and TodateVersion are of DateVersionSpec type. The values which I could see while debugging are -
{DateVersionSpec instance 96838616
Date: 8/26/2021 6:26:41 PM
OriginalText:
}
{DateVersionSpec instance 223932934
Date: 9/25/2021 6:26:41 PM
OriginalText:
}

0 Votes 0 ·

0 Answers