Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G Genesys Website
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGR
  • Genesys Website
  • Issues
  • #260
Closed
Open
Created Mar 20, 2019 by Matija Obreza@mobrezaOwner

StringArrFilter: Indented categories

sampStat, collSrc and storage filters have entries that are actually categories with sub-categories:

Example for "TYPE OF GERMPLASM STORAGE": "Long term seed collection" is a subcategory of "Seed collection":

"10": "Seed collection",
      "11": "Short term seed collection",
      "12": "Medium term seed collection",
      "13": "Long term seed collection",
"20": "Field collection",

image

By checking the "super" category, all sub-categories should be automatically ticked. On un-ticking, no changes are needed.

Example for "SAMPSTAT":

"100": "Wild",
  "110": "Natural",
  "120": "Semi-natural/wild",
  "130": "Semi-natural/sown",
"200": "Weedy",
"300": "Traditional cultivar/Landrace",
"400": "Breeding/Research Material",
  "410": "Breeders Line",
    "411": "Synthetic population",
    "412": "Hybrid",
    "413": "Founder stock/base population",
    "414": "Inbred line",
    "415": "Segregating population",
    "416": "Clonal selection",
  "420": "Genetic stock",
    "421": "Mutant",
    "422": "Cytogenetic stocks",
    "423": "Other genetic stocks",
"500": "Advanced/improved cultivar",
"600": "GMO",
"999": "Other"

Identifying categories and their sub-categories

Regexp ^(\d+)(0+)$ should identify potential "parents". Child records are those that start with regexp match group $1.

For "100": "Wild", ^(\d+)(0+)$ on "100" matches and gives two groups: "1" and "00". Children are those that start with "1".

For "410": "Breeders Line", ^(\d+)(0+)$ on "410" matches and gives two groups: "41" and "0". Children are those categories that start with "41".

If supplying <StringArrFilter indented flag, the component should operate in "indented mode" as described here.

Edited Mar 20, 2019 by Matija Obreza
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking