UofS-Pulse-Binfo / analyzedphenotypes

Tripal/Drupal support for analyzed phenotypic data including data loaders, exporters, trait pages and summaries on germplasm pages.
GNU General Public License v2.0
0 stars 1 forks source link

Issue # 15 - Save term id and load term name into fields #16

Closed reynoldtan closed 6 years ago

reynoldtan commented 6 years ago

Added function to save term id and load human readable term names into field in configuration page.

To test:

  1. Disable module, then uninstall it.
  2. Using dev/execute php terminal delete all system variables (this will be addressed in the next issue).
  3. With all system variables cleared, Enable the module. Again, ignore old variable names.
  4. Load configuration page. Notice all default cvterm ids from previous branch are now replaced with a name.
  5. Test Validation:
    • Enter in non-existent term (eg. Lorem :) ) click save - Should get term does not exists error message.
    • Leave term empty - Should get term x field is empty error message.
    • Set one of the 3 fields in genus and leave the rest to default - Should get select cv/db error message.
  6. To see value saved.
    
    $m = chado_query("select name from variable where name like '%analyzed%'")
    ->fetchAll();

foreach($m as $n) { $k = variable_get($n->name);
echo $n->name . ' - ' . $k . "\n"; }



Additional update:
- added inline script to select field value when clicked to ease entering new value.
laceysanderson commented 6 years ago

Works perfectly 👍