-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Improve consistency of field titles, labels, types across the schema #19531
Conversation
(Standard links)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem to make sense but would note that ./setup.sh -g
would need to be run as well
Conflicting files |
1a83112
to
73440bf
Compare
73440bf
to
047c500
Compare
Argh - we should have merged quickly while it was unconflicted & passing - looks like it went stale! @ahed-compucorp this is obviously a tricky PR to manage since it's inclined to go stale & run into test issues. Maybe if you drop out the last commit for now it will be passing again & we can move more quickly to merge I'm happy to leave the DAO generation @seamuslee001 mentioned until all is merged |
@eileenmcnaughton MCs have been fixed but there are some test failures due to tests expecting certain field titles to be returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these updates look good to me & will help the Search Kit UI feel consistent.
@eileenmcnaughton I can regenerate DAO files with I was feeling a bit overwhelmed by how DAO files are generated from theses xml files in |
7bbffe7
to
a4b48f7
Compare
This looks perfect. Thank you @ahed-compucorp |
a4b48f7
to
281b62a
Compare
Great work @ahed-compucorp ! |
'description' => ts('FK to Contact ID'), | ||
'where' => 'civicrm_website.contact_id', | ||
'table_name' => 'civicrm_website', | ||
'entity' => 'Website', | ||
'bao' => 'CRM_Core_BAO_Website', | ||
'localizable' => 0, | ||
'FKClassName' => 'CRM_Contact_DAO_Contact', | ||
'html' => [ | ||
'label' => ts("Contact"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies in advise for commenting on a merged PR and spamming everyone.
But I was trying to track down a field label inconsistency in the Data Processor, https://lab.civicrm.org/extensions/dataprocessor/-/issues/90
Why is this field label "Contact" and not "Contact ID" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between "title" and "label" is that the title describes what the field contains (Contact ID) and the label is how a form label would appear (a Select field labeled "Contact").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool thanks @colemanw
Overview
The purpose of this PR is to normalize field titles, labels & widgets across the schema to follow these conventions:
<html><type>Number</type></html>
<title>
should end with "ID" and<html><label>
should not. E.g.Address.contact_id
field should havetitle
"Contact ID" andlabel
"Contact".Email.contact_id
should have thetitle
"Contact ID" not "Email Contact ID" and thelabel
should be "Contact" not "Email Contact".