bcgov / nr-spar

SPAR app from FDS (Forestry Digital Services)
https://www2.gov.bc.ca/gov/content/industry/forestry/managing-our-forest-resources/tree-seed/seed-planning-use/spar
Apache License 2.0
2 stars 0 forks source link

Different parent tree GW values + utc date changes #1435

Closed craigyu closed 1 month ago

craigyu commented 2 months ago

investigate the get parent tree by vegcode endpoint and its sql query, find out why the gw values for certain trees are different

Image

Image

example from SX PG LOW

Investigation complete

Task:

RMCampos commented 2 months ago

Spotted that bug again, when trying to edit the seedlot on the review form.

Logging from the application Condition:

if (!parentTreeData.allParentTreeData[key]) {
  console.log('no parentTreeData.allParentTreeData[key] for key', key);
  console.log('parentTreeData.tableRowData', JSON.stringify(parentTreeData.tableRowData));
  console.log('parentTreeData.allParentTreeData', JSON.stringify(parentTreeData.allParentTreeData));
  console.log('Object.keys(parentTreeData.tableRowData)', JSON.stringify(Object.keys(parentTreeData.tableRowData)));
}

Result

no parentTreeData.allParentTreeData[key] for key 37
parentTreeData.tableRowData {"37": ...} (added file Log-line-two.txt)
parentTreeData.allParentTreeData {}
Object.keys(parentTreeData.tableRowData) ["37","69","101","129","192","202","212","239","241","300","327","508","568","760","969","970","3141","3144","3169","3171","3210","3245","3247","3400","3427","3428","3431","3432","3455","3500","3518","3524","3552","3846","3847","3848","3849","3853","3856","3887","3915","3941","3942","3947","3948","3949","3950","3951","3954","3955","3957","3958","3959","3960","3961","3983","3986","3987","3988","3989","3990","5004","5005","5014","5016","5019","5027","5030","5032","5033","5036","5037","5040","5041","5046","5049","5050","5051","5055","5057","5058","5059","5065","5068","5077","5078","5086","5087","5090","5094","5100","5104","5110","5112","5113","5114","5118","5119","5126","5128","5134","5136","5137","5139","5142","5143","5149","5153","5154","5302","5306","5307","5312","5314","5325","5328","5331"]

Attachment file:

log-line-two.txt

craigyu commented 1 month ago

Implementation done in #1491, needs to add/modify tests still

craigyu commented 1 month ago

need tests still