Closed Bug 745081 Opened 12 years ago Closed 12 years ago

Allow access to individual filter properties to support customizable item filters

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mmecca, Assigned: mmecca)

References

(Blocks 4 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

We currently support a limited number of predefined item filters that filter items based on date range, status, and due date collectively. Exposing the filter properties individually would allow users to create custom views that could combine those property filters in a customized way.

This will allow customizable filtering toolbar controls to be used in the calendar filter bars in Bug 728011.

Additionally this can allow the currently applied filter properties to be exposed to other areas like the print dialog.
Assignee: nobody → matthew.mecca
Blocks: 728011, 729028
Depends on: 728759, 734817
Attached patch Fix v1 (obsolete) — — Splinter Review
This patch creates a new calFilterProperties object that contains a set of filter properties, and allows the calFilter object to define sets of filter properties by a filter name. The filter properties can then be applied by either the calFilterProperties object or the defined filter name. 

The previously available filters for the unifinder and task trees are made available as predefined filter properties.
Attachment #614682 - Flags: review?(philipp)
I considered moving the calFilter.js code to modules/calFilter.jsm - what are your thoughts on this?
Status: NEW → ASSIGNED
Blocks: 673751
Blocks: 727613
Comment on attachment 614682 [details] [diff] [review]
Fix v1

Review of attachment 614682 [details] [diff] [review]:
-----------------------------------------------------------------

Great work, this looks really promising!

::: calendar/base/src/calFilter.js
@@ +147,5 @@
> +            return (this[prop] == aFilterProps[prop]);
> +        }, this);
> +    },
> +
> +    LOG: function cFP_LOG() {

Maybe expand this by an argument aString, that might ease debugging in the future.

@@ +148,5 @@
> +        }, this);
> +    },
> +
> +    LOG: function cFP_LOG() {
> +        cal.LOG("calFilterProperties" + 

We often use [calFilterProperties] as a scheme

@@ +714,5 @@
> +
> +        let oneDay = cal.createDuration();
> +        oneDay.days = 1;
> +        this.mTomorrow = this.mToday.clone();
> +        this.mTomorrow.addDuration(oneDay);

What about:

this.mTomorrow = this.mToday.clone();
this.mTomorrow.day++;

?
Attachment #614682 - Flags: review?(philipp) → review+
Blocks: 746524
Attached patch Fix v2 — — Splinter Review
Fixes a few issues with v1:

- Adapts the today pane's Show completed Tasks checkbox.
- Fixes an issue with filters based on the current-view date range inadvertently modifying the view's end date.
- Adds a clone method to calFilterProperties to avoid inadvertently modifying the defined filter properties.
Attachment #614682 - Attachment is obsolete: true
Attachment #617177 - Flags: review?(philipp)
Blocks: 757467
Comment on attachment 617177 [details] [diff] [review]
Fix v2

Looks good, r=philipp
Attachment #617177 - Flags: review?(philipp) → review+
Pushed to comm-central - http://hg.mozilla.org/comm-central/rev/02bb6cc0fe6e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.7
Hi, the bug is not fixed in Firefox 17.0.8 - Ligh 1.9.1 the problem is:

all my tasks have only a final date and no start date. It is not possible to print tasks which must be finished on a special date. I think the problem is, that you include all no set start date task in the selected time frame. The following implementation will be correct.

for one Task to print must be checked:

is set a start date? ->
YES: is the date in the selected time frame? YES: -> put it in the basket (to print)
NO: do nothing

is set a final date? ->
YES: is the date in the selected time frame? YES: -> is the item not in the basket? -> NO: put it in the basket (to print)
NO: do nothing

done.

Do you know what i mean?

It will be great if you can correct that or explain, what I understand wrong (that functionality) and we find a other/better solution.

Thanks
Peter
in Lightning 2.6 and Thunderbird 24 exist the problem only in the List layout in the month and week layout the problem seems be fixed
Peter, can you please file a new bug on the remaining issue? This way the developers can better track the remaining problems and work to be done. Thank you!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: