Closed
Bug 410287
Opened 17 years ago
Closed 16 years ago
calICalendar.getProperty returns always value type string
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
RESOLVED
FIXED
1.0b1
People
(Reporter: sebo.moz, Assigned: dbo)
References
Details
Attachments
(1 file, 1 obsolete file)
12.63 KB,
patch
|
dbo
:
review-
|
Details | Diff | Splinter Review |
If setting a property boolean false via calICalendar.setProperty(), then calICalendar.getProperty() does not evaluate as expected. For instance !cal.getProperty("someProperty") will not be true because it returns "0" as string. I will attach a unit test as proof.
Flags: wanted-calendar0.8?
Reporter | ||
Comment 1•17 years ago
|
||
I needed to change calCalendarManager.js in order for the unit tests to work. Reason is, that there exists no profile for the unit tests and thus dbService.getProfileStorage("profile") always throws. The special case for 1.8 branch is not needed any more since it was indeed 1.8.0 branch specific. The patch changes the "suppressAlarms" property using setProperty and checks the result using getProperty. It failes for storageCalendar since it returns always string values.
Attachment #294918 -
Flags: review?(daniel.boelzle)
Reporter | ||
Comment 2•17 years ago
|
||
Proposed quick workaround.
Assignee | ||
Comment 3•17 years ago
|
||
Sebo, the WIP patch of bug 393395 incorporates a workaround for boolean properties unless we save properties into the prefs.
Comment 4•17 years ago
|
||
This bug is not important enough to warrant wanted0.8 status. We would however take a fix for this bug into 0.8, if such a fix materializes.
Flags: wanted-calendar0.8? → wanted-calendar0.8-
Reporter | ||
Comment 5•17 years ago
|
||
This bug blogs a wanted-0.8 bug. It is therefore important. A fix has materialized in bug 393395 (see comment 3).
Depends on: 393395
Reporter | ||
Comment 6•17 years ago
|
||
"blogs" should read "blocks", of course :-)
Updated•17 years ago
|
Assignee: nobody → sebo.moz
Assignee | ||
Comment 7•17 years ago
|
||
(In reply to comment #0) > If setting a property boolean false via calICalendar.setProperty(), then > calICalendar.getProperty() does not evaluate as expected. > > For instance !cal.getProperty("someProperty") will not be true because it > returns "0" as string. This will be thoroughly fixed with bug 378754 when we shift calendar registration and prefs into the prefs. Unless that is done, we need to do the manual conversion in calProviderBase::get/setProperty. This has been done with bug 393395 for all known properties.
Assignee | ||
Comment 8•17 years ago
|
||
Comment on attachment 294918 [details] [diff] [review] unit test for calICalendar.getProperty/setProperty Besides that the patch contains some functions that IMO don't relate to this bug like compareItems, I think you should work on a registered calendar instead of manually setting the id. If you wouldn't do that, then calProviderBase stores the props only transiently (IIRC bug 393395 changes that) which should be testable, too.
Attachment #294918 -
Flags: review?(daniel.boelzle) → review-
Updated•16 years ago
|
Flags: wanted-calendar0.8-
Assignee | ||
Updated•16 years ago
|
Assignee | ||
Updated•16 years ago
|
Flags: wanted-calendar0.9+ → wanted-calendar1.0+
OS: Linux → All
Hardware: PC → All
Assignee | ||
Comment 9•16 years ago
|
||
fixed with bug 403006
Assignee: sebo.moz → daniel.boelzle
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Updated•16 years ago
|
Attachment #294920 -
Attachment is obsolete: true
Updated•14 years ago
|
Target Milestone: 1.0 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•