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

minus sign in #set requires spaces to surround it

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5
    • 2.1
    • Engine
    • None

    Description

      The following example:

      #set($thisCampNumber = 10)
      #set($nextCampNumber = $thisCampNumber+1)
      #set($previousCampNumber = $thisCampNumber-1)
      #set($previousCampNumberB = $thisCampNumber - 1)

      1: $thisCampNumber<br>
      2: $nextCampNumber<br>
      3: $previousCampNumber<br>
      4: $previousCampNumberB<br>

      produces this result

      1: 10
      2: 11
      3: $previousCampNumber
      4: 9

      Note that using a minus sign in a #set statement does not work if there are no spaces around it. (however, the same is not true for +).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cbrisson Claude Brisson
            wglass William Glass-Husain
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment