shumana chowdhury
shumana chowdhury

Reputation: 1882

Editing Redmine calendar in dashboard

In Redmine's calendar, I would like to show all Tasks/Issues on which a currently logged in person in the account is a Member, Task Creator, Assignee, Reporter, or Watcher.

Now, from the following two arrays of helper.rb, I have created another array which merges issues_only and tasks_only. Then I wish to call that array in view part.

def issues_only issues_all = issuesreportedbyme_items issues_all.push *issueswatched_items issues_all.push *issuesassignedtome_items all = issues_all.reject{|v| v.tracker_id == 4} rest = all.reject {|k| k.status_id == 5 } rest.inject([]) { |result,h| result << h unless result.include?(h); result } end

def tasks_only tasks_all = issuesreportedbyme_items tasks_all.push *issueswatched_items tasks_all.push *issuesassignedtome_items all = tasks_all.reject{|v|v.tracker_id == 5} rest = all.reject {|k| k.status_id == 5 } rest.inject([]) { |result,h| result << h unless result.include?(h); result }

end Now, my question is what to include in view part in order to show the required calendar.

Upvotes: 2

Views: 310

Answers (1)

Montag451
Montag451

Reputation: 1172

As you can see on this image the Calendar tab has filter options same as all other lists in Redmine. First you click on the filter switch icon (the little triangle on the image) and then you can add your filters to a report, list, gantt chart etc by selecting the filters from the filter selection combo box.

Your main problem will be that this filters don't have any logical operator feature. All the filters you select will be connected with the 'AND' operator so you can't define a list, gantt or report which corresponds to your 'OR' operator.

To get all the activities of all members of a specific project you only have to select the project and then unselect the "is : open" filter on the project calendar and click on "Apply Settings".

PS : This image is taken from our customized Redmine installation which has the Easyredmine plugin but the basics of filters are the same with Redmine.

enter image description here

Edit: A way achieving your 'OR' requirement would be just selecting the filters which don't belong to your requirements and applying those filters. This way you would exclude those specific criteria that you want to apply the 'OR' statement to.

Don't forget to select the appropriate status filter in your filters. (Status is open/close/any/is not/is)

Upvotes: 1

Related Questions