Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Genesys Backend
Genesys Backend
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #543

Closed
Open
Opened Aug 28, 2020 by Matija Obreza@mobrezaOwner
  • Report abuse
  • New issue
Report abuse New issue

Taxonomy2: Update reference to GRIN Taxonomy

The references to GRIN taxonomy grinTaxonomySpecies (and its current variant currentTaxonomySpecies) are automatically detected with the Taxonomy2GRINMatcher.

The detection method is not 100% accurate and may not always detect a matching GRIN record or an incorrect one is assigned.

The UI changes are described in genesys-ui#733 (closed)

  • Add FilteredPage<TaxonomySpecies> listSpecies(TaxonomySpeciesFilter filter, Pagination.. method at /taxonomy/grin-species to the Taxonomy controller
  • Add Taxonomy2 setGrinSpecies(long taxonomy2Id, Long customGrinSpecies) method at /taxonomy/set-grin-species
class TaxonomySpeciesFilter {
 String _text;
 Set<String> genus;
 Set<String> species;
 StringFilter subtaxa;  
}

The setGrinSpecies() method in the TaxonomyService will:

  1. if grinSpeciesId != null, load TaxonomySpecies and set
    1. new property overrideTaxonomySpecies
    2. grinTaxonomySpecies = loaded.id
    3. currentTaxonomySpecies = loaded.currentTaxonomySpecies.id.
  2. if grinSpeciesId == null, clear grinTaxonomySpecies, currentTaxonomySpecies and overrideTaxonomySpecies

Update Taxonomy2GRINMatcher

Update Taxonomy2GRINMatcher so that it will use overrideTaxonomySpecies if it is declared.

When the detected TaxonomySpecies.id === overrideTaxonomySpecies.id, then set overrideTaxonomySpecies = null, because now the override is no longer required.

Extended TaxonomyExtraFilter

Update the existing controller endpoint to list Taxonomy2 records with an enhanced TaxonomyFilter with extra options:

class TaxonomyExtraFilter extends TaxonomyFilter {
 Boolean overrides; // if null, ignore. if true, then add `taxonomy2.overrideTaxonomySpecies.notNull()` else `isNull()`
 Boolean grin; // if true, add `taxonomy2.grinTaxonomySpecies.notNull()` else `isNull`
}

The /list endpoint is accessible to all authenticated users.

Edited Aug 31, 2020 by Matija Obreza
Assignee
Assign to
2.5
Milestone
2.5
Assign milestone
Time tracking
None
Due date
None
Reference: genesys-pgr/genesys-server#543