Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-956

velocity 1.7 vs velocity 2.3: evaluation of scripts with empty value is not backward compatible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3
    • None
    • Engine, Scripting
    • None

    Description

      Script:     

       

        "vLATE_GATE_IN_6":"#set( $inTimeZone = $date.getTimeZone().getTimeZone('Europe/Berlin') )\n\n#set( $outTimeZone = $date.getTimeZone().getTimeZone('Asia/Shanghai') )\n\n#set( $locale = $date.getLocale() )\n\n#set( $myDate = $convert.parseDate(${*}

      {lead.lateGateIn}

      {*},\"yyyy-MM-dd HH:mm\",$locale,$inTimeZone) )\n\n${date.format('yyyy-MM-dd hh:mm a',$myDate,$locale,$outTimeZone)} "

      note: lead.lateGateIn = "" in the values 

      there are multiple other scripts vLATE_GATE_IN_5, vLATE_GATE_IN_4 but in the script vLATE_GATE_IN_4 , the values for convert.parseDate is given as below:

      $convert.parseDate("2022-04-22") 

       

      Issue

      Older version of velocity evaluates the script vLATE_GATE_IN_6 to: 

      Time):\\n\\n\\n\\n
      n2022-04-22 11:00 AM

       

      Newer version of velocity evaluates the script vLATE_GATE_IN_6 to: 

        Time):\\n\\n\\n\\n
      n${date.format('yyyy-MM-dd hh:mm a',$myDate,$locale,$outTimeZone)}
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ambika ambika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: