Update to purge functionality (D832) - #607
Conversation
pwlodarski-ctrlo
left a comment
There was a problem hiding this comment.
Overall looks good - just one or two clarity comments.
pwlodarski-ctrlo
left a comment
There was a problem hiding this comment.
PR reviewed - appears fine for me.
pwlodarski-ctrlo
left a comment
There was a problem hiding this comment.
PR re-reviewed - minor comments added for consideration.
pwlodarski-ctrlo
left a comment
There was a problem hiding this comment.
PR re-re-reviewed - appears fine to me!
|
Needs rebasing to current dev as there are some minor changes to datum (i.e. calc datetime) which need taking into account before merge |
|
Relies on #639 being merged first |
Specific datum changes are present as not every datum is purgeable. The system will now mark the record as purged and disallow editing, putting the record into an archived state. Further discussion may be required as to whether to mark the record as archived within the table as it is displayed as well as current (new) functionality to show the record as archived once the record is opened.
Also remove error with cloning date and daterange objects
1782604 to
e7e33bd
Compare
droberts-ctrlo
left a comment
There was a problem hiding this comment.
Comments added to improve clarity
| extends 'GADS::Datum'; | ||
| with 'GADS::DateTime'; | ||
|
|
||
| has schema => ( |
There was a problem hiding this comment.
Now in Datum.pm - taken from $->record->schema
| } | ||
|
|
||
| sub _build_valuefield { ('value_text','value_numeric','value_int','value_date','value_datetime','value_date_from','value_date_to'); } | ||
| sub _build_value_fields { ['value_text','value_numeric','value_int','value_date', 'value_datetime','value_date_from','value_date_to'] } |
There was a problem hiding this comment.
This was a typo - also datetime field added to value_fields
| $changed{$column->id} ||= []; | ||
| push @{$changed{$column->id}}, $record->current_id | ||
| if $datum->changed; | ||
| if($datum->changed) { |
There was a problem hiding this comment.
If the value is purged, there will be no change, thus no need to write the value.
Specific datum changes are present, as not every datum is purgeable. The system will now mark the record as purged and disallow editing, putting the record into an archived state.
Further discussion may be required as to whether to mark the record as archived within the table as it is displayed as well as current (new) functionality to show the record as archived once the record is opened.