CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Bug or No Bug - getParticipantCount()
Pages: [1]

Author Topic: Bug or No Bug - getParticipantCount()  (Read 720 times)

geeffland

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Bug or No Bug - getParticipantCount()
June 08, 2010, 09:42:18 am
In Event\BAO\Event.php under the getParticipantCount function near line 583 (in civiCRM 3.1.3)

LIMIT 0, 10  shows up in the query for getting the participant count... Is there any reason for the limit???  I had a custom call to this function where not all of my participant counts were showing up... ended up removing the LIMIT 0, 10 part from the query.

Is this correct as is or should I report a bug?

Thanks,
Greg

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Bug or No Bug - getParticipantCount()
June 08, 2010, 10:19:16 am

We just display 10 events and hence that function works for us.

BUT, yes that is a bug :) and we should fix. The idea scenario would be to send in both an offset and a limit as parameters to the function with a default of 0, 10 (so as not to mess with exisiting code)

If no offset/limit are passed, than the code should retrieve it for all events

wanna patch the code and file an issue along with the patch

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

geeffland

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: Bug or No Bug - getParticipantCount()
June 09, 2010, 01:19:57 pm
It may be a few days but I will certainly post an issue and patch with the optional arguments.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Bug or No Bug - getParticipantCount()

This forum was archived on 2017-11-26.