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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Export Full State Names not Abbreviations
Pages: [1]

Author Topic: Export Full State Names not Abbreviations  (Read 1125 times)

Aahar

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 3
  • CiviCRM version: 3.4 and 4.0
  • CMS version: Drupal 6.17, 6.x and Drupal 7.x
  • PHP version: 5.2
Export Full State Names not Abbreviations
May 16, 2013, 03:31:19 am
"Export Full State Names not Abbreviations" has come up occasionally in the forum
For instance:  http://forum.civicrm.org/index.php?action=post;topic=21897.0;last_msg=113602

I cannot contribute code but can consider sponsoring this.


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: Export Full State Names not Abbreviations
May 16, 2013, 10:10:30 am

I think there is already a token for this. If not adding it as a token and also including it in the primary export is definitely a good project for 4.4

I suspect its a 20 hour project. Contact us on IRC / offline if your org can sponsor this

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

vakeesan26

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.3,4.4,4.5
  • CMS version: Drupal 7.x
  • MySQL version: 5.6.1
  • PHP version: 5.4.12
Re: Export Full State Names not Abbreviations
September 01, 2014, 02:46:20 am
in CRM/Contact/BAO/Query.php (4.5 beata 8 )
line 5520   
is this patch workable ?
Code: [Select]
     elseif ($value['pseudoField'] == 'state_province_abbreviation') {
          $country_id = CRM_Core_PseudoConstant::countryIDForStateID($val);
          $result = civicrm_api3('Country', 'get', array(
          'sequential' => 1,
          'id' => $country_id,
          ));
          if($result['values'][0]['is_province_abbreviated'] == 1){
          $dao->$key = CRM_Core_PseudoConstant::stateProvinceAbbreviation($val);
          }else{
          $states = CRM_Core_PseudoConstant::stateProvinceForCountry($country_id);
          if (array_key_exists($val, $states)) {
          $dao->$key = $states[$val];
          }
          }
        }
« Last Edit: February 19, 2015, 01:14:32 am by vakeesan26 »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Export Full State Names not Abbreviations

This forum was archived on 2017-11-26.