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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Issue with API Tag, function tag_create
Pages: [1]

Author Topic: Issue with API Tag, function tag_create  (Read 1929 times)

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Issue with API Tag, function tag_create
April 14, 2009, 07:40:03 am
According to the documentation the API function civicrm_tag_create updates an existing record if the tag_id is passed as params['tag']. So I have done this in my script:
Code: [Select]
$params = array(
'tag' => $id,
            'name'        => $name,
            'description' => $description
             );
It just creates a new tag though, and does not update one even though the value of id is that of an existing tag. Am I making a mistake?
By the way, I now update the database directly.

Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Issue with API Tag, function tag_create
April 14, 2009, 08:41:21 am
hi,

It is bug, fixed for CiviCRM v2.2 and will be available in next stable release.
would be great if you test patch

thanks
kiran


You Are Designed To Choose... Defined By Choice.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Issue with API Tag, function tag_create
April 14, 2009, 08:53:50 am
I have tested the patch and it works fine, results exactly as expected!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Issue with API Tag, function tag_create

This forum was archived on 2017-11-26.