#371 ClearCase History sort by date not working.

2.x
closed-fixed
None
5
2014-04-23
2014-01-22
James
No

Step to reproduce
1. Goto ClearCase History view in eclipse
2. Click the Date column (sort by date)

It try to sort using the date string not the actual time. (since the date is in dd-mmm-yy format, the sort order is not the normal expected date time sort. See attachment)

1 Attachments

Discussion

  • Mikael Petterson

    I think that the date is a String so the sort will not work as expected. Is it possible that you can send me the output form:

    cleartool lshistory -long <any cc="" element="">

    so that I can see the output from the command.

    br,

    //mike

     
  • Mikael Petterson

    Looking at:https://sourceforge.net/p/clearcase-java/code/ci/master/tree/net.sourceforge.clearcase/src/commandline/net/sourceforge/clearcase/ClearCaseCLIImpl.java#l2189

    and line 2179 and we retrive the date as a String and when we later use compare it will not sort in the same order as if it was a Date object. I suggest that we change the parsed string in line 2195 to a date object using:

    http://stackoverflow.com/questions/2201925/converting-iso8601-compliant-string-to-java-util-date

    //mike

     
  • Mikael Petterson

    • assigned_to: Mikael Petterson
    • Priority: 3 --> 5
     
  • Mikael Petterson

    This is how our date looks like:

    2007-09-27T12:35:46+02:00

     
  • Mikael Petterson

    Or as in reporters case: 01-Apr-08.12:38:04

     
  • Mikael Petterson

    Fixed and will be in release 2.2.35.

     
  • Mikael Petterson

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks