View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001229 | v3.0 Release | [All Projects] General | public | 2012-12-19 12:06 | 2013-08-28 11:17 | ||||
Reporter | lolcode | ||||||||
Assigned To | caseydk | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | 3.0.0 | |||||||
Summary | 0001229: Using the CProject class programmatically overwrites/loses custom fields when the store function is called | ||||||||
Description | Main issue: Class CProject assumes input values always come from $_POST: if ($stored) { $custom_fields = new w2p_Core_CustomFields('projects', 'addedit', $this->project_id, 'edit'); $custom_fields->bind($_POST); $sql = $custom_fields->store($this->project_id); // Store Custom Fields CTask::storeTokenTask($AppUI, $this->project_id); } Which in turn calls this which doesn't even check if the value is set before overwriting: public function bind(&$formvars) { if (!count($this->fields) == 0) { foreach ($this->fields as $k => $v) { $this->fields[$k]->setValue(@$formvars[$k]); } } } Which in turn calls this in CustomField.php and that only works for character fields: public function setValue($v) { $this->value_charvalue = $v; } | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
![]() |
|
caseydk (administrator) 2012-12-22 22:31 |
Resolved: https://github.com/caseysoftware/web2project/commit/a1d4ea6d032e72be760b7d0492c4a27f94f3eb7e |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-12-19 12:06 | lolcode | New Issue | |
2012-12-22 22:30 | caseydk | Project | v2.4 Release (Closed) => v3.0 Release |
2012-12-22 22:31 | caseydk | Note Added: 0002757 | |
2012-12-22 22:31 | caseydk | Status | new => resolved |
2012-12-22 22:31 | caseydk | Resolution | open => fixed |
2012-12-22 22:31 | caseydk | Assigned To | => caseydk |
2013-08-28 11:14 | caseydk | Fixed in Version | => 3.0.0 |
2013-08-28 11:17 | caseydk | Status | resolved => closed |