Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-9048

Calendar week begins with sunday independently from locale

      Independently of the locale, the calendar week shown e.g. when selecting a date always begins by sunday.
      As we in germany (UK too, as far as I know) begin the calender week by monday, this year the calendar weeks are shifted.
      Eg. today (16-Jan-2006) we have CW 3 with german (or UK) locale, but CW 2 with US locale.
      As we very heavily use calendar weeks for our shippings, this is a real problem.
      I tried changing the locale of the system user starting jira, the field "Default language" in the general configuration of jira,
      and my own locale as a user in my user preferences, but no one of these 3 had any effects on the calendar week.
      Is there a way in jira to change this?

            [JRASERVER-9048] Calendar week begins with sunday independently from locale

            Same issue for me

            Elias Schwendimann added a comment - Same issue for me

            The date picker in start date still has Sunday even though I have the setting ISO activated

            James Parnell added a comment - The date picker in start date still has Sunday even though I have the setting ISO activated

            Perhaps it is related to JRA-20014. Whilst fixing JRA-20014 we will be sure to use your steps to reproduce to ensure the issue is resolved.

            frother (Inactive) added a comment - Perhaps it is related to JRA-20014 . Whilst fixing JRA-20014 we will be sure to use your steps to reproduce to ensure the issue is resolved.

            Hello Álvaro Sánchez-Mariscal,

            Apologies this issue is still affecting you. I have tried to reproduce it locally by:

            1. Setting the user profile locale to German
            2. Clicking on the "duedate" picker from the edit issue page
            3. Clicking the release date picker from manage versions (in project admin)

            Both of these pickers had Monday as the first day.

            I also tried setting the system locale (Administration > General Configuration). The same pickers still had Monday as the first day.

            Are you able to please let me know how this problem can be reproduced. Perhaps I should be trying a different locale?

            Thankyou

            frother (Inactive) added a comment - Hello Álvaro Sánchez-Mariscal, Apologies this issue is still affecting you. I have tried to reproduce it locally by: Setting the user profile locale to German Clicking on the "duedate" picker from the edit issue page Clicking the release date picker from manage versions (in project admin) Both of these pickers had Monday as the first day. I also tried setting the system locale (Administration > General Configuration). The same pickers still had Monday as the first day. Are you able to please let me know how this problem can be reproduced. Perhaps I should be trying a different locale? Thankyou

            I do have JIRA 4 (v4.1.2#531)

            Álvaro Sánchez-Mariscal [Salenda] added a comment - I do have JIRA 4 (v4.1.2#531)

            Pia Olstad added a comment -

            Perhaps it was only fixed in version 4, Álvaro?
            Have you upgraded?

            Pia Olstad added a comment - Perhaps it was only fixed in version 4, Álvaro? Have you upgraded?

            How can a issue like this remain open for more than 4 years?

            And why is it marked as resolved if it isn't really fixed?

            Álvaro Sánchez-Mariscal [Salenda] added a comment - How can a issue like this remain open for more than 4 years? And why is it marked as resolved if it isn't really fixed?

            Hello,

            in Jira 3.13.x the workaround for the ISO 8601 first week of year is similar to the monday workaround.
            In the same files:

            atlassian-jira/WEB-INF/classes/templates/plugins/jira/macros.vm

            template/standard/datepicker2.jsp

            template/single/datepicker2.jsp

            after the line in the calendar setup where you correct the "firstDay : 0," to "firstDay : 1," add the following line:

                    useISO8601WeekNumbers : true, // first week of the year
            

            Bettina Zucker added a comment - Hello, in Jira 3.13.x the workaround for the ISO 8601 first week of year is similar to the monday workaround. In the same files: atlassian-jira/WEB-INF/classes/templates/plugins/jira/macros.vm template/standard/datepicker2.jsp template/single/datepicker2.jsp after the line in the calendar setup where you correct the "firstDay : 0," to "firstDay : 1," add the following line: useISO8601WeekNumbers : true, // first week of the year

            Concerning the First Week Of Year problem, see JRA-10088.

            Bettina Zucker added a comment - Concerning the First Week Of Year problem, see JRA-10088 .

            Maybe I did something wrong, but I got Project Administration - Manage Versions monday change after modifing
            template/standard/datepicker2.jsp and template/single/datepicker2.jsp
            includes\js\calendar\calendar.js modificatsions did not help in Enterprise Edition, Version: 3.13.2.

            Now its only the JIRA Calendar Plugin monday left for me

            Jaan Raamets added a comment - Maybe I did something wrong, but I got Project Administration - Manage Versions monday change after modifing template/standard/datepicker2.jsp and template/single/datepicker2.jsp includes\js\calendar\calendar.js modificatsions did not help in Enterprise Edition, Version: 3.13.2. Now its only the JIRA Calendar Plugin monday left for me

            Hi,

            I have managed to change the start of the week from Sunday to Monday at Project Administration - Manage Versions.

            //this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD;
            this.firstDayOfWeek = 1;

            This is done in the includes\js\calendar\calendar.js. I guess this would override (hardcode) the value of the first day of the week (from 0 to 1).

            Regards,
            Timothy

            Timothy Chin [Atlassian] added a comment - - edited Hi, I have managed to change the start of the week from Sunday to Monday at Project Administration - Manage Versions. //this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; this.firstDayOfWeek = 1; This is done in the includes\js\calendar\calendar.js . I guess this would override (hardcode) the value of the first day of the week (from 0 to 1). Regards, Timothy

            Does this mean there is no workaround in this case?

            Bettina

            Bettina Zucker added a comment - Does this mean there is no workaround in this case? Bettina

            AntonA added a comment -

            The same copy of the calendar is used. However it is invoked differently from different places. The main reason for this is that plugins cannot use JSPs and have to use velocity.

            AntonA added a comment - The same copy of the calendar is used. However it is invoked differently from different places. The main reason for this is that plugins cannot use JSPs and have to use velocity.

            Bettina Zucker added a comment - - edited

            Hello,

            my users found a second place where this error occurs.
            In the popup calendar of Project Administration - Manage Versions.
            This calendar looks very similar to the javascript one which is referenced in the macro.
            But it is not affected by any changes in the macro, so it must be a separately defined one!

            How can I change this second calendar?

            Why don't you just use one single copy of the popup calendar and configure it in one single place?

            Regards
            Bettina Zucker

            Bettina Zucker added a comment - - edited Hello, my users found a second place where this error occurs. In the popup calendar of Project Administration - Manage Versions. This calendar looks very similar to the javascript one which is referenced in the macro. But it is not affected by any changes in the macro, so it must be a separately defined one! How can I change this second calendar? Why don't you just use one single copy of the popup calendar and configure it in one single place? Regards Bettina Zucker

            Hello Judith,

            you are right, of course. Setting the first day of the week to monday only works for this year.
            We need also the possibility to set the first week of the year according to one of the existing standards,
            as e.g. in Outlook, where we have 3 choices.

            To Atlassian:
            It would be nice to have a solution before 2010 !

            Cheers

            Bettina

            Bettina Zucker added a comment - Hello Judith, you are right, of course. Setting the first day of the week to monday only works for this year. We need also the possibility to set the first week of the year according to one of the existing standards, as e.g. in Outlook, where we have 3 choices. To Atlassian: It would be nice to have a solution before 2010 ! Cheers Bettina

            In Austria, Germany, UK (and maybe many more) the first calendar week doesn't depend on our first day of week (monday), it's defined the first week with 4 days in the new year. This year it doesn't matter, because it's accidental the same, but it will be a problem in 3 or 4 years.

            quote from wikipedia:

            ...The international standard ISO 8601 also defines Monday as the first day of the week. In practice, this means that calendar formats disagree, and that "next week" said on Sunday means "the week beginning tomorrow".

            In that international standard, the "first week of the year" is that week which includes the first Thursday of the year.

            Judith Gmeiner added a comment - In Austria, Germany, UK (and maybe many more) the first calendar week doesn't depend on our first day of week (monday), it's defined the first week with 4 days in the new year. This year it doesn't matter, because it's accidental the same, but it will be a problem in 3 or 4 years. quote from wikipedia: ...The international standard ISO 8601 also defines Monday as the first day of the week. In practice, this means that calendar formats disagree, and that "next week" said on Sunday means "the week beginning tomorrow". In that international standard, the "first week of the year" is that week which includes the first Thursday of the year.

            BrianH added a comment -

            Hi Bettina,

            Apologies for that, I neglected to test the change on Jira 3.3.3. To make the same change for 3.3.3, you will need to edit the file \atlassian-jira\secure\popups\calendar.jsp and make the same change as above.

            Let us know if this works for you.

            Thanks,
            Brian

            BrianH added a comment - Hi Bettina, Apologies for that, I neglected to test the change on Jira 3.3.3. To make the same change for 3.3.3, you will need to edit the file \atlassian-jira\secure\popups\calendar.jsp and make the same change as above. Let us know if this works for you. Thanks, Brian

            Hi Brian,

            I made the change on my test system (Jira 3.4.3 enterprise) and it worked very well.
            On my production system with Jira 3.3.3 enterprise your solution did not work though.
            This is because the whole macro datePopup is missing in macros.vm of Jira 3.3.3.
            I tried added the complete macro, but it did not help either.
            I bet our IT section will not start an upgrade of a production system just for some minor functionality.
            So if you have any suggestion about how to solve the problem without making an upgrade please tell!

            Cheers Bettina

            Bettina Zucker added a comment - Hi Brian, I made the change on my test system (Jira 3.4.3 enterprise) and it worked very well. On my production system with Jira 3.3.3 enterprise your solution did not work though. This is because the whole macro datePopup is missing in macros.vm of Jira 3.3.3. I tried added the complete macro, but it did not help either. I bet our IT section will not start an upgrade of a production system just for some minor functionality. So if you have any suggestion about how to solve the problem without making an upgrade please tell! Cheers Bettina

            Hi Brian,

            I made the change on my test system (Jira 3.4.3 enterprise) and it worked very well.
            On my production system with Jira 3.3.3 enterprise your solution did not work though.
            This is because the whole macro datePopup is missing in macros.vm of Jira 3.3.3.
            I tried added the complete macro, but it did not help either.
            I bet our IT section will not start an upgrade of a production system just for some minor functionality.
            So if you have any suggestion about how to solve the problem without making an upgrade please tell!

            Cheers Bettina

            Bettina Zucker added a comment - Hi Brian, I made the change on my test system (Jira 3.4.3 enterprise) and it worked very well. On my production system with Jira 3.3.3 enterprise your solution did not work though. This is because the whole macro datePopup is missing in macros.vm of Jira 3.3.3. I tried added the complete macro, but it did not help either. I bet our IT section will not start an upgrade of a production system just for some minor functionality. So if you have any suggestion about how to solve the problem without making an upgrade please tell! Cheers Bettina

            BrianH added a comment -

            Hi Bettina,

            It is possible for you to change the default setting by editing the velocity file atlassian-jira\WEB-INF\classes\templates\plugins\jira\macros.vm.

            You should just need to change the following line:

            firstDay       :    0,                  // first day of the week
            

            to

            firstDay       :    1,                  // first day of the week
            

            Once changed just restart Jira and your datepicker should start on Monday.

            Let us know if you have any further questions.

            Thanks,
            Brian

            BrianH added a comment - Hi Bettina, It is possible for you to change the default setting by editing the velocity file atlassian-jira\WEB-INF\classes\templates\plugins\jira\macros.vm . You should just need to change the following line: firstDay : 0, // first day of the week to firstDay : 1, // first day of the week Once changed just restart Jira and your datepicker should start on Monday. Let us know if you have any further questions. Thanks, Brian

              sharwood frother (Inactive)
              22a146e1ed05 Bettina Zucker
              Affected customers:
              11 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h
                  8h