Summary

      One of the customer is reporting an issue related to week number being wrong when implementing a user macro.

      Steps to Reproduce

      1. Create an user macro with the following content:
        ## Macro title: My Macro
        ## Macro has a body: Y or N
        ## Body processing: Selected body processing option
        ## Output: Selected output option
        ##
        ## Developed by: My Name
        ## Date created: dd/mm/yyyy
        ## Installed by: My Name
        
        ## This is an example macro
        ## @param Name:title=Name|type=string|required=true|desc=Your name
        ## @param Colour:title=Favourite Colour|type=enum|enumValues=red,green,blue|default=red|desc=Choose your favourite colour
        
        #set($calendar = $action.dateFormatter.calendar)
        #set($week= $calendar.get(3)) #* 3rd field of constants = WEEK_OF_YEAR *#
        $week
        $calendar
        
      2. Embed the newly created macro on a Confluence page

      Expected results

      The correct week number is displayed, for example on March 14th, 2016 it should be 11.

      Actual results

      The week number displayed is higher than the expected, for March 14th, 2016 it displays 12.

      The above is caused by the minimalDaysInFirstWeek setting derived is set to 1 instead of 4, which makes the first truncated week to be counted.

      Workaround

      Updating JAVA_OPTS (Confluence 5.5 and earlier or CATALINA_OPTS 5.6 or later) variable in <confluence-install>/bin/setenv.sh with adding the following options: -Duser.language=en -Duser.country=GB -Duser.variant=GB .

          Form Name

            [CONFSERVER-41043] Wrong week number in user macros

            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2886418 ] New: CONFSERVER Bug Workflow v4 [ 2980321 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2804381 ] New: JAC Bug Workflow v3 [ 2886418 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Adam Barnes (Inactive) made changes -
            Resolution New: Timed out [ 10 ]
            Status Original: Gathering Impact [ 12072 ] New: Resolved [ 5 ]
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2718811 ] New: JAC Bug Workflow v2 [ 2804381 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1

              Unassigned Unassigned
              oraissi Omar Raissi (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: