Project

General

Profile

Changing default value for filter

Added by Beom Jin Park about 14 years ago

Is there any way to change default value for filter in issue list and calendar?

My final goal is to display only certain trackers in issue list and calendar page as default and I believe the easiest way is to change default filter setting to be something like "Tracker is TrackerA" other than current default setting "Status open".

Can anyone show how to do this, by hard coding or otherwise?


Replies (3)

RE: Changing default value for filter - Added by Felix Schäfer about 14 years ago

You could specify another default filter here: source:/trunk/app/models/query.rb#L141, or add different filters to any Query.new call at the places you need.

RE: Changing default value for filter - Added by Beom Jin Park about 14 years ago

Thanks for the reply. I successfully changed default filter, but since I want to use different filter for issue list page and calendar page, I need to add another filter. Can you tell me which how I can do that?

Thanks

RE: Changing default value for filter - Added by Felix Schäfer about 14 years ago

Both controllers call QueriesHelper#retrieve_query (source:/trunk/app/helpers/queries_helper.rb#L68) to either build a query from the session or from paramaters or a new one. I don't see any quick/good way to test which controller the method is called from though, so I'll let you do your homework from here on.

    (1-3/3)