Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little issue show meetings #38

Open
renzoyugi opened this issue Sep 27, 2016 · 8 comments
Open

Little issue show meetings #38

renzoyugi opened this issue Sep 27, 2016 · 8 comments

Comments

@renzoyugi
Copy link

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

@dro123
Copy link
Owner

dro123 commented Sep 27, 2016

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
Copy link
Owner

dro123 commented Sep 27, 2016

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

@renzoyugi
Copy link
Author

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

@dro123
Copy link
Owner

dro123 commented Sep 28, 2016

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
Copy link
Owner

dro123 commented Sep 29, 2016

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
Copy link
Owner

dro123 commented Sep 29, 2016

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

@renzoyugi
Copy link
Author

Thanks sir, is the correct solution !!!

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

Greetings.

@dro123
Copy link
Owner

dro123 commented Oct 4, 2016

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

It should really work with 100 too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants