-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pseudoconstant for Relationship.relationship_type_id #19278
Add pseudoconstant for Relationship.relationship_type_id #19278
Conversation
(Standard links)
|
@colemanw test fails relate |
1015b78
to
355aa7c
Compare
This adds basic pseudoconstant support for the field using name_a_b and label_a_b (it does not support other properties like name_b_a) For legacy purposes it preserves the work done in civicrm#11853 to return a list like [1_a_b => Child of, 1_b_a => Parent of] if the "is_form" flag is set. This was very nonstandard but is used to support in-place editing of the relationship type list on the relationship form.
355aa7c
to
1ac9bb5
Compare
Test Result (6 failures / -25) |
baf8f46
to
78fae00
Compare
We discussed this & code approach seems OK - I'm going to give it a r-run |
OK - this seems to work the same - @colemanw explained that for apiv3 it will be possible to pass the name_a value for the relationship - whereas the v4 api uses either name_a or name_b |
@eileenmcnaughton corection - both api versions will only use |
Overview
Updates the relationship schema to add a pseudoconstant to the
relationship_type_id
field.Before
No pseudoconstant declared, but APIv3 would return an option list for the field (but in a nonstandard format).
After
Pseudoconstant declared. APIv3 and APIv4 return option list in standard format, unless legacy
"is_form"
param is set.Technical Details
This adds basic pseudoconstant support for the field using
name_a_b
andlabel_a_b
(it does not support other properties likename_b_a
)For legacy purposes it preserves the work done in #11853 to return a list like
[1_a_b => Child of, 1_b_a => Parent of]
if the"is_form"
flag is set.This was very nonstandard but is used to support in-place editing of the relationship type list on the relationship form.