If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Allow access to individual filter properties to support customizable item filters

RESOLVED FIXED in 1.7

Status

Calendar
Internal Components
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: mmecca, Assigned: mmecca)

Tracking

(Blocks: 4 bugs)

unspecified
Dependency tree / graph

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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)

Updated

6 years ago
Assignee: nobody → matthew.mecca
Blocks: 728011, 729028
Depends on: 728759, 734817
(Assignee)

Comment 1

6 years ago
Created attachment 614682 [details] [diff] [review]
Fix v1

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)
(Assignee)

Comment 2

6 years ago
I considered moving the calFilter.js code to modules/calFilter.jsm - what are your thoughts on this?
Status: NEW → ASSIGNED
(Assignee)

Updated

6 years ago
Blocks: 673751
(Assignee)

Updated

6 years ago
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+
(Assignee)

Updated

6 years ago
Blocks: 746524
(Assignee)

Comment 4

6 years ago
Created attachment 617177 [details] [diff] [review]
Fix v2

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)
(Assignee)

Updated

5 years ago
Blocks: 757467
Comment on attachment 617177 [details] [diff] [review]
Fix v2

Looks good, r=philipp
Attachment #617177 - Flags: review?(philipp) → review+
(Assignee)

Comment 6

5 years ago
Pushed to comm-central - http://hg.mozilla.org/comm-central/rev/02bb6cc0fe6e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.7

Comment 7

4 years ago
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

Comment 8

4 years ago
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.