2 Replies Latest reply: Oct 19, 2012 4:19 AM by 968980 RSS

    Issues with the decimal symbol with attributes of the data type currency

    968980
      OPA settings and environment settings

      OPA version
      10.3.0.77

      OPA Project properties
      Rule language: Dutch
      Region: Netherlands (Dutch)

      OS configuration
      Windows 7 Professional Service Pack 1
      Region and Language
      Formats>Format: Dutch (Netherlands)
      Formats>Additional settings>Numbers>Decimal symbol: ,
      Location>Current location: Netherlands

      The issues cause some suspicion concerning the way OPA handles the decimcal symbol in localization. Furthermore the issues I have with the decimal symbol are seriously affecting test case and test script maintenance.

      The most important issue with regards to test script maintenance is the following.

      *1) Amounts of attributes of the data type currency are multiplied by 10 when opening a test script (.tsc) in OPM*
      In a test script an amount is stored as below:
      <currency-val>30.0</currency-val>

      When opening this test script in OPM (right click on the Test Scripts folder and in the context menu click Add Existing File) the amount is changed into 300.0

      *2) Decimal symbol changes from ',' to '.' when opening a test script (.tsc) in OPM*
      In a test script an amount is stored as below:
      <currency-val>30,0</currency-val>

      When opening this test script in OPM (right click on the Test Scripts folder and in the context menu click Add Existing File) the decimal symbol is changed from ',' into so the amount is now 30.0

      *3) In OPM an amount entered with comma as decimal symbol is stored incorrectly*
      Steps to reproduce
      A test case is present.
      Open the test case.
      Double click on a base attribute of the data type currency
      Enter an amount with ',' as decimal symbol (for example: 30,05)
      OPM converts this amount to 3005.0
      This obviously is not the intended amount.
        • 1. Re: Issues with the decimal symbol with attributes of the data type currency
          Kevin Wan
          *1) Amounts of attributes of the data type currency are multiplied by 10 when opening a test script (.tsc) in OPM*

          This is a bug caused by the system locale which has been fixed in version 10.3.1. Can you please upgrade your OPM version and let us know whether the issue is fixed or not?


          *2) Decimal symbol changes from ',' to '.' when opening a test script (.tsc) in OPM*

          Test script should always save number/currency attributes using unformatted values, i.e. '.' as decimal symbol.


          *3) In OPM an amount entered with comma as decimal symbol is stored incorrectly*

          This is the expected behavior. Unformatted attribute values are used in the debugger and test case editor where data values are entered directly, therefore comma will be ignored.

          Edited by: Kevin Wan on 18-Oct-2012 15:17
          • 2. Re: Issues with the decimal symbol with attributes of the data type currency
            968980
            Kevin, thanks for making this clear! I'm not sure if I can upgrade right now, but will try.