Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-4845

On mssql, the Test Evolution Gadget stops working if the dateformat it's not set to mdy

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • R3.5.5
    • 4.0.0
    • Gadget, REST_API
    • None
    • R4.0.0 Blue S1
    • OK

    Description

      On mssql, the Test Evolution Gadget stops working if the dateformat it's not set to "mdy".

      If in the database configuration the dateformat it's not set to "mdy", Xray will throw an Exception when using the Test Evolution Gadget.

      /rest/raven/1.0/chart/test/evolution [c.x.r.dao.impl.TestsEvolutionDAOImpl] Error executing Test Evolution select statement
      com.microsoft.sqlserver.jdbc.SQLServerException: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
      	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
      	at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:6309)
      	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1651)
      	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:987)
      	at org.apache.commons.dbcp2.DelegatingResultSet.next(DelegatingResultSet.java:191)
      	at org.apache.commons.dbcp2.DelegatingResultSet.next(DelegatingResultSet.java:191)
      	at com.xpandit.raven.dao.impl.TestsEvolutionDAOImpl.a(Unknown Source)
      	at com.xpandit.raven.dao.impl.TestsEvolutionDAOImpl.a(Unknown Source)
      

       
      Xray should be able to handle any dateformat configuration set by the customer.

      Steps to reproduce:

      1. Check your mssql database configuration. Look for the dateformat entry.
        DBCC USEROPTIONS;
        
      2. If the dateformat it's set to "mdy", change it to "dmy"
        SET DATEFORMAT dmy;
        
      3. Make the Test Evolution Gadget Rest API call
        <server>/rest/raven/1.0/chart/test/evolution?dateScope=timeFrame&timeFrame=currentWeek&testExecSavedFilter=10004&lastDays=6&_=1577455253142
        
      4. The call will return empty result, even when they exist. If you check the Jira's logs, you will see the mentioned error.

      Attachments

        Issue Links

          Activity

            People

              pmmr Pedro Rodrigues
              hslb Hugo Braz [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours, 40 minutes
                  1d 4h 40m