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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • [FIXED] Batch update via Profile - copy icon fails for fields of 'select' type
Pages: [1]

Author Topic: [FIXED] Batch update via Profile - copy icon fails for fields of 'select' type  (Read 880 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
[FIXED] Batch update via Profile - copy icon fails for fields of 'select' type
June 27, 2014, 08:04:15 am
This behaviour works on the 4.4 Demo and fails on the 4.5 Sandbox.
  • Create custom data for a Contact which contains a field with format 'select'
  • Create a profile that displays that field
  • On the results of a contact search, select the 'Batch update via Profile' task and the Profile just created
  • Fill in the field for the first row and press the Copy Icon, to reproduce that value in subsequent rows

The expected behaviour is the contents of the field in the first row should be copied to all rows. This happens in 4.4 but not 4.5.alpha2.

I've tracked the problem to lines 142-152 of templates/CRM/common/batchCopy.tpl but I can't resolve it any further because I lack JS skills.

Code: [Select]
        if (elementId.is('select') === true && firstElement.parent().find(':input').select().index() >= 1) {
          // its a multiselect case
          firstElement.parent().find(':input').select().each( function(count) {
            var firstElementValue = cj(this).val();
            var elementId = cj('.crm-copy-fields [name^="field["][name*="[' + fname +'][' + count + '"][type!=hidden]');
            elementId.val(firstElementValue).not(":first").change();
          });
        }
        else {
          elementId.val(firstElementValue).change();
        }

The outside 'if statement' is the issue: in 4.5 the 'if' part is taken, while in 4.4 the 'else' part is taken.
« Last Edit: August 16, 2014, 01:16:24 pm by Coleman Watts »

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: 4.5 Batch update via Profile - copy icon fails for fields of 'select' type
June 29, 2014, 09:23:55 pm
ken:

Can you file an issue for same for 4.5 in our issue tracker.

Thanks!
Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: 4.5 Batch update via Profile - copy icon fails for fields of 'select' type
June 29, 2014, 09:48:48 pm
Filed https://issues.civicrm.org/jira/browse/CRM-14927 for the same.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: 4.5 Batch update via Profile - copy icon fails for fields of 'select' type
July 01, 2014, 09:57:07 pm
ken :

We have fixed the same in https://github.com/civicrm/civicrm-core/pull/3592.patch

It will be available in our next release.

Thanks for catching this!
Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 4.5 Batch update via Profile - copy icon fails for fields of 'select' type
July 10, 2014, 04:44:48 am
Yashodha,

Thanks for fixing this!

Ken

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 4.5 Batch update via Profile - copy icon fails for fields of 'select' type
July 13, 2014, 02:57:07 am
This fix works in 4.5.beta1. Yay!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • [FIXED] Batch update via Profile - copy icon fails for fields of 'select' type

This forum was archived on 2017-11-26.