Issue Details (XML | Word | Printable)

Key: JRA-9048
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Bettina Zucker
Votes: 7
Watchers: 12
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
JIRA

Calendar week begins with sunday independently from locale

Created: 16/Jan/06 04:53 AM   Updated: 12/Dec/07 03:22 AM
Component/s: Internationalisation
Affects Version/s: 3.3.3, 3.4.3
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Standalone on Windows (Test System Jira 3.4.3) and Linux (Working System Jira 3.3.3)

Participants: Anton Mazkovoi [Atlassian], Bettina Zucker, Brian Nguyen [OLD], Judith Bürgstein and Timothy Chin [Atlassian]
Since last comment: 51 weeks ago
Labels:


 Description  « Hide
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?

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brian Nguyen [OLD] added a comment - 17/Jan/06 05:03 PM
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


Bettina Zucker added a comment - 18/Jan/06 03:34 AM
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 - 18/Jan/06 03:42 AM
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


Brian Nguyen [OLD] added a comment - 18/Jan/06 09:38 PM
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


Judith Bürgstein added a comment - 05/Apr/06 04:19 AM
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.


Bettina Zucker added a comment - 05/Apr/06 05:12 AM
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 - 10/Dec/07 10:13 AM - 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


Anton Mazkovoi [Atlassian] added a comment - 11/Dec/07 02:42 AM
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 - 11/Dec/07 02:46 AM
Does this mean there is no workaround in this case?

Bettina


Timothy Chin [Atlassian] added a comment - 12/Dec/07 03:10 AM - 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