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 »
  • Long term release support (Moderators: mathieu, Eileen, youngjin) »
  • Checkbox "counted?" in participant role options not updated in 4.4.9 lts
Pages: [1]

Author Topic: Checkbox "counted?" in participant role options not updated in 4.4.9 lts  (Read 1395 times)

erwindeclerck

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4.9 + 4.5.2 + 4.5.4 + 4.5.5
  • CMS version: 7
  • MySQL version: 5.5.40
  • PHP version: 5.3.10-1ubuntu3.15
Checkbox "counted?" in participant role options not updated in 4.4.9 lts
November 19, 2014, 10:26:53 am
Fresh install of LTS 4.4.9
Problem doesn't exist in 4.5.2. anymore.
I have tried to find out where it goes wrong but can't find anything.
Is this something for a patch for the LTS version?

Kind regards,
Erwin

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Checkbox "counted?" in participant role options not updated in 4.4.9 lts
November 19, 2014, 12:52:27 pm
Can you provide steps to reproduce?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

erwindeclerck

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4.9 + 4.5.2 + 4.5.4 + 4.5.5
  • CMS version: 7
  • MySQL version: 5.5.40
  • PHP version: 5.3.10-1ubuntu3.15
Re: Checkbox "counted?" in participant role options not updated in 4.4.9 lts
November 19, 2014, 02:02:56 pm
Okay,
Drupal 7 + Civicrm 4.4.9. fresh install
Logged in as admin:
Go to SITE/civicrm/admin/options/participant_role?group=participant_role&reset=1
Edit one of the role options and change the checkbox => Counted? from set to unset  e.g:SITE/civicrm/admin/options/participant_role?group=participant_role&action=update&id=99&reset=1
SAVE => Counted stays unchanged.
If however you create a new participant role, and you don't set te Counte? checkbox, this field is saved as unset.
Once you set it, you can save this new value, but you can not unset it again...
The values of the other fields update like they should.
Kind regards.
Erwin

erwindeclerck

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4.9 + 4.5.2 + 4.5.4 + 4.5.5
  • CMS version: 7
  • MySQL version: 5.5.40
  • PHP version: 5.3.10-1ubuntu3.15
Re: Checkbox "counted?" in participant role options not updated in 4.4.9 lts
November 19, 2014, 10:38:24 pm
Good morning,

After some better investigation and comparing 4.4.9 to 4.5.4 I found an important difference:
- in file: \civicrm\CRM\Admin\Form\Options.php
- in function:  public function postProcess() on line 360
-> around lines 398 of 4.4.9

Version 4.4.9:

      // set db value of filter in params if filter is non editable
      if ($this->_id && !array_key_exists('filter', $params) && !$this->_gName == 'participant_role') {
        $params['filter'] = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'filter', 'id');
      }

changed to in 4.5.4:
 
      // set value of filter if not present in params
      if ($this->_id && !array_key_exists('filter', $params)) {
        if ($this->_gName == 'participant_role') {
          $params['filter'] = 0;
        } else {
          $params['filter'] = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'filter', 'id');
        }
      }

Replacing this if-clause resolves the issue. I don't see any negative side effects...

Kind regards,
Erwin

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Checkbox "counted?" in participant role options not updated in 4.4.9 lts
November 19, 2014, 11:25:41 pm
Do you want to log a ticket - we can patch 4.4 branch with that
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

erwindeclerck

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.4.9 + 4.5.2 + 4.5.4 + 4.5.5
  • CMS version: 7
  • MySQL version: 5.5.40
  • PHP version: 5.3.10-1ubuntu3.15
Re: Checkbox "counted?" in participant role options not updated in 4.4.9 lts
November 20, 2014, 12:42:09 am
Thanks Eileen,
I posted a reply on the ticket I opened yesterday  (lobo)
https://issues.civicrm.org/jira/browse/CRM-15620
I hope it's the right way to do it;
Kind regards
Erwin

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Long term release support (Moderators: mathieu, Eileen, youngjin) »
  • Checkbox "counted?" in participant role options not updated in 4.4.9 lts

This forum was archived on 2017-11-26.