Update to purge functionality (D832) - #607
Conversation
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.
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.
Also remove error with cloning date and daterange objects
pwlodarski-ctrlo
left a comment
There was a problem hiding this comment.
PR re-reviewed - minor comments added for consideration.
| use Dancer2; | ||
| use Dancer2::Plugin::DBIC; | ||
| use Dancer2::Plugin::LogReport mode => 'VERBOSE'; | ||
| use Dancer2::Plugin::LogReport mode => 'DEBUG'; |
There was a problem hiding this comment.
Do we want to this be in DEBUG?
| my $old_content = $old_value ? $old_value->content : undef; | ||
| my $old_name = $old_value ? $old_value->name : undef; | ||
| if (defined $old_content && defined $old_name) { | ||
| if(my $fl = $self->schema->resultset('Fileval')->search({ |
There was a problem hiding this comment.
Just for continuity of formatting across the file, would it be worth adding a space after the if ?
| { my $self = shift; | ||
| my $return = $self->for_table_template; | ||
| $return->{values} = $self->files; | ||
| $return->{values} = $self->is_purged ? ["[purged]"] : $self->files; |
There was a problem hiding this comment.
Does Datum::File inherit the is_purged method from a parent object? I see that the local is_purged sub has been deleted.
| use strict; | ||
| use warnings; | ||
|
|
||
| use Log::Report; |
There was a problem hiding this comment.
Is Log::Report used in this file?
pwlodarski-ctrlo
left a comment
There was a problem hiding this comment.
PR re-re-reviewed - appears fine to me!
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.