redmine_meeting_room_calendar icon indicating copy to clipboard operation
redmine_meeting_room_calendar copied to clipboard

Little issue show meetings

Open renzoyugi opened this issue 8 years ago • 8 comments

I have a problem, on project there are 102 meetings but on calendar only shows 100 meetings, where i can change code for limit???, thanks

I change on this line 49 (meetingcalendar.js)

data : 'key=' + api_key + '&project_id=' + project_id + meeting_room_query + '&start_date=' + encodeURIComponent('>=') + today + '&status_id=' + encodeURIComponent('*') + '&limit=' + 100 + '&offset=' + offset,

I changed value 100 for 500 but nothing happen

renzoyugi avatar Sep 27 '16 15:09 renzoyugi

It should recursively call that function with a higher offset until all tickets are loaded (lower limit just means more calls, the result should be the same):

https://github.com/dro123/redmine_meeting_room_calendar/blob/master/assets/javascripts/meetingcalendar.js#L66

Could you check what "data.total_count" is? Insert alert(data.total_count); above line 66.

dro123 avatar Sep 27 '16 16:09 dro123

Could it be that the other 2 are from yesterday? It only loads meetings from today and the future.

dro123 avatar Sep 27 '16 17:09 dro123

Hi Sir,

Thanks for answers, i think that the problem is on array limit Is object data an array ??? can i change size array ?? how ???

limit100

renzoyugi avatar Sep 28 '16 10:09 renzoyugi

Forget that limit pls, it's not your problem. :-) Just leave it at 100.

Just put this: alert(data.total_count); above line 66 and tell me what it says. It should pop up a window with a number, if you load the page.

dro123 avatar Sep 28 '16 17:09 dro123

Just saw that the number is actually on the screenshot. It says it found 99 issues in total (without a limit) and these issues got loaded. Are you sure there are more than 100? This looks like it's doing what it should do.

dro123 avatar Sep 29 '16 21:09 dro123

If you really want to try if a higher limit changes anything you need to change it here and in redmine too:

http://www.redmine.org/projects/redmine/repository/entry/trunk/app/controllers/application_controller.rb#L581

Change the line from elsif limit > 100 to something like elsif limit > 1000

dro123 avatar Sep 29 '16 21:09 dro123

Thanks sir, is the correct solution !!!

I change limit to 500, it´s works ... thank you very much.

Greetings.

renzoyugi avatar Oct 04 '16 10:10 renzoyugi

Could you try again with limit 100 and this commit? 04649f3751447442ab4e4f739d68c6dbffe79723

It should really work with 100 too!

dro123 avatar Oct 04 '16 22:10 dro123