-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Indexes and metadata cleanup from setup_catalog #1486
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When user selects a SampleType in Add Sample Form, Templates that have a Sample Type assigned, but not the same as the one selected, are not displayed for selection. This commit also includes some clean-up of indexes and metadata that are no longer used.
the ajax call was only used when ClientID schema field was rendered. Client is the only content type that provides this field... and since this field is required, supposed to be unique and displayed on adding/editing a Client, it does not make sense to load a reference widget there for search+selection
ramonski
approved these changes
Dec 7, 2019
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.
Phew, lots of stuff... But great cleanup, thanks for that!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the issue/feature this PR addresses
This Pull Request cleans up stale indexes and metadata fields from setup_catalog. It also does some renaming to adhere to latest code conventions.
Indexes
Additions
listing_searchable_text
(TextIndexNG3)Replacements
getAvailableMethodUIDs
→method_available_uid
getCategoryUID
(FieldIndex) →category_uid
(KeywordIndex)getDepartmentTitle
(FieldIndex) →department_title
(KeywordIndex)getDepartmentUID
(FieldIndex) →department_uid
(KeywordIndex)getInstrumentTitle
(FieldIndex) →instrument_title
(KeywordIndex)getInstrumentTypeName
(FieldIndex) →instrumenttype_title
(KeywordIndex)getPointOfCapture
→point_of_capture
getPrice
→price
getSampleTypeTitle
(FieldIndex) →sampletype_title
(KeywordIndex)getSampleTypeUIDs
(FieldIndex) →sampletype_uid
(KeywordIndex)getTotalPrice
→price_total
Removals
cancellation_state
: stalegetAccredited
: used in the "hidden" view accreditation to filter services labeled as "accredited". Since we don't expect that listing to contain too many items, they are now filtered by waking-up the objectgetAnalyst
: stalegetBlank
: stalegetCalculationTitle
: stalegetCalculationUID
: stalegetCalibrationExpiryDate
: stalegetCategoryTitle
: stalegetDocumentID
: stalegetDuplicateVariation
: stalegetFormula
: stalegetFullname
: used for sorting in LabContacts listing. Replaced bysortable_title
getHazardous
: stalegetInstrumentLocationName
: stalegetInstrumentType
: stalegetManagerEmail
: stalegetManagerName
: stalegetManagerPhone
: stalegetMaxTimeAllowed
: stalegetMethodID
: stalegetModel
: stalegetName
: stalegetSamplePointTitle
: stalegetSamplePointUID
: stalegetSampleTypeTitle
: stalegetSampleTypeTitles
: Only used in add2 to filter Sample Points by Sample Type when a Sample Type was selected. Now,sampletype_uid
is used insteadgetSampleTypeUID
: stalegetServiceUID
: stalegetUnit
: stalegetVATAmount
: stalegetVolume
: stalegetServiceUIDs
: staleSearchableText
: staleMetadata fields
Removals
cancellation_state
: stalegetAccredited
: stalegetBlank
: stalegetCalculationTitle
: stalegetCalculationUID
: stalegetCalibrationExpiryDate
: stalegetDepartmentTitle
: stalegetDuplicateVariation
: stalegetFormula
: stalegetFullname
: stalegetHazardous
: stalegetInstrumentLocationName
: stalegetInstrumentTitle
: stalegetInstrumentType
: stalegetInstrumentTypeName
: stalegetManagerEmail
: stalegetManagerName
: stalegetManagerPhone
: stalegetMaxTimeAllowed
: stalegetModel
: stalegetName
: stalegetPointOfCapture
: stalegetPrice
: stalegetSamplePointUID
: stalegetSampleTypeTitle
: stalegetSampleTypeUID
: stalegetServiceUID
: stalegetTotalPrice
: stalegetUnit
: stalegetVATAmount
: stalegetVolume
: staleCurrent behavior before PR
A lot of stale indexes and metadata in setup_catalog
Desired behavior after PR is merged
No stale indexes or metadata in setup_catalog
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.