Closed Bug 460967 Opened 11 years ago Closed 10 years ago

Sorting of tasks to their title in the task-tree is not working

Categories

(Calendar :: Calendar Views, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: berend.cornelius09, Assigned: martinschroeder)

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

The sorting of tasks in the task is not working when the sorting field is a text field.
Attached patch patch v. #1 (obsolete) — Splinter Review
The locale collator was not created properly because the interface was not passed
Assignee: nobody → Berend.Cornelius
Status: NEW → ASSIGNED
Attachment #344098 - Flags: review?(daniel.boelzle)
Attached patch patch v. #1.1 (obsolete) — Splinter Review
This is the right patch.
Attachment #344098 - Attachment is obsolete: true
Attachment #344100 - Flags: review?
Attachment #344098 - Flags: review?(daniel.boelzle)
Attachment #344100 - Flags: review? → review?(daniel.boelzle)
Comment on attachment 344100 [details] [diff] [review]
patch v. #1.1

Ah! Now I understand why the bug didn't show up: calUtils.js' functions are loaded into the |cal| object (at the end of calUtils.jsm). That way the previous buggy definition won't have effect.

>     createLocaleCollator: function cal_createLocaleCollator() {
>-      var localeService = generateServiceAccessor("@mozilla.org/intl/nslocaleservice;1");
>-      return generateServiceAccessor("@mozilla.org/intl/collation-factory;1")
>+      var localeService = generateServiceAccessor("@mozilla.org/intl/nslocaleservice;1", Components.interfaces.nsILocaleService);
>+      return generateServiceAccessor("@mozilla.org/intl/collation-factory;1", Components.interfaces.nsICollationFactory)
>             .CreateCollation(localeService.getApplicationLocale());
>      },
> 

I don't see why this will work, because generateServiceAccessor returns a *function*, not an object, and has been designed to be used *only* for plain service accessors like getIOService.
The definition of createLocalCollator from calUtils.js (old file) is *OK*, probably just needs some indentation. Just move it over to calUtils.jsm.
Attachment #344100 - Flags: review?(daniel.boelzle) → review-
Can you explain what is going wrong and provide steps to reproduce the issue? 

Seems to work for me using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090324 Calendar/1.0pre. During my test I used tasks with titles like "AAA", "áaa", "aba", "àca", "äöü", "foo", "zzz" and the sort order looks correct.
Assignee: berend.cornelius09 → nobody
Assignee: nobody → mschroeder
Attached patch Patch v2Splinter Review
Attachment #344100 - Attachment is obsolete: true
Attachment #385433 - Flags: review?(philipp)
Comment on attachment 385433 [details] [diff] [review]
Patch v2

r=philipp
Attachment #385433 - Flags: review?(philipp) → review+
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/c10119db13ca>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
verifying with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9pre) Gecko/20100305 Calendar/1.0b2pre
Status: RESOLVED → VERIFIED
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.