Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Won't Fix
-
Affects Version/s: 4.5.5, 4.6
-
Fix Version/s: 4.6
-
Component/s: CiviCRM API
-
Labels:
-
Documentation Required?:None
Description
If I create a relationship like this:
drush cvapi Relationship.create sequential=1 contact_id_a=45 contact_id_b=1 relationship_type_id=5 start_date="2004-06-02"
I get:
Array
(
[is_error] => 0
[version] => 3
[count] => 1
[id] => 12619
[values] => Array
(
[0] => Array
(
[id] => 12619
[contact_id_a] => 45
[contact_id_b] => 1
[relationship_type_id] => 5
[start_date] => 20040602000000
[end_date] => NULL
[is_active] => 1
[description] =>
[is_permission_a_b] => 0
[is_permission_b_a] => 0
[case_id] =>
)
)
)
The returned start date is in the wrong format: 20040602000000 instead of 2004-06-02 (which is the correct format, I presume). If I get the relationship afterwards, the result is correct:
drush cvapi Relationship.getsingle sequential=1 id=12619
Array
(
[id] => 12619
[contact_id_a] => 45
[contact_id_b] => 1
[relationship_type_id] => 5
[start_date] => 2004-06-02
[is_active] => 1
[description] =>
[is_permission_a_b] => 0
[is_permission_b_a] => 0
)