Skip to content
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 101 commits into from
Dec 7, 2019
Merged

Conversation

xispa
Copy link
Member

@xispa xispa commented Dec 2, 2019

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

  • getAvailableMethodUIDsmethod_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)
  • getPointOfCapturepoint_of_capture
  • getPriceprice
  • getSampleTypeTitle (FieldIndex) → sampletype_title (KeywordIndex)
  • getSampleTypeUIDs (FieldIndex) → sampletype_uid (KeywordIndex)
  • getTotalPriceprice_total

Removals

  • cancellation_state: stale
  • getAccredited: 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 object
  • getAnalyst: stale
  • getBlank: stale
  • getCalculationTitle: stale
  • getCalculationUID: stale
  • getCalibrationExpiryDate: stale
  • getCategoryTitle: stale
  • getDocumentID: stale
  • getDuplicateVariation: stale
  • getFormula: stale
  • getFullname: used for sorting in LabContacts listing. Replaced by sortable_title
  • getHazardous: stale
  • getInstrumentLocationName: stale
  • getInstrumentType: stale
  • getManagerEmail: stale
  • getManagerName: stale
  • getManagerPhone: stale
  • getMaxTimeAllowed: stale
  • getMethodID: stale
  • getModel: stale
  • getName: stale
  • getSamplePointTitle: stale
  • getSamplePointUID: stale
  • getSampleTypeTitle: stale
  • getSampleTypeTitles: Only used in add2 to filter Sample Points by Sample Type when a Sample Type was selected. Now, sampletype_uid is used instead
  • getSampleTypeUID: stale
  • getServiceUID: stale
  • getUnit: stale
  • getVATAmount: stale
  • getVolume: stale
  • getServiceUIDs: stale
  • SearchableText: stale

Metadata fields

Removals

  • cancellation_state: stale
  • getAccredited: stale
  • getBlank: stale
  • getCalculationTitle: stale
  • getCalculationUID: stale
  • getCalibrationExpiryDate: stale
  • getDepartmentTitle: stale
  • getDuplicateVariation: stale
  • getFormula: stale
  • getFullname: stale
  • getHazardous: stale
  • getInstrumentLocationName: stale
  • getInstrumentTitle: stale
  • getInstrumentType: stale
  • getInstrumentTypeName: stale
  • getManagerEmail: stale
  • getManagerName: stale
  • getManagerPhone: stale
  • getMaxTimeAllowed: stale
  • getModel: stale
  • getName: stale
  • getPointOfCapture: stale
  • getPrice: stale
  • getSamplePointUID: stale
  • getSampleTypeTitle: stale
  • getSampleTypeUID: stale
  • getServiceUID: stale
  • getTotalPrice: stale
  • getUnit: stale
  • getVATAmount: stale
  • getVolume: stale

Current 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.

xispa added 30 commits November 22, 2019 19:43
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.
@xispa xispa added Cleanup 🧹 Code cleanup and refactoring and removed PR: Not Ready ⛔️ labels Dec 3, 2019
@xispa xispa requested a review from ramonski December 3, 2019 15:48
Copy link
Contributor

@ramonski ramonski left a 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!

@ramonski ramonski merged commit e1228c1 into master Dec 7, 2019
@ramonski ramonski deleted the setup_indexes branch December 7, 2019 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup 🧹 Code cleanup and refactoring
Development

Successfully merging this pull request may close these issues.

2 participants