[Rt-commit] rt branch, 4.6/log-view-db-config-change-history, repushed
Aaron Trevena
ast at bestpractical.com
Fri Mar 27 10:43:12 EDT 2020
The branch 4.6/log-view-db-config-change-history was deleted and repushed:
was e3bd093371d75119fe9a0eaeaff25eba52c6d4a9
now 650b7b1234dfee7f7732cbcfd846a7e285802f73
1: 039be68775 = 1: 039be68775 Schema updates for tracking db configuration changes in transactions
2: f6f43cfd15 ! 2: 25315c0903 Log DB config changes as transactions
@@ -191,9 +191,7 @@
+ $RT::Handle->Rollback;
+ return ($ok, $msg);
+ }
-
-- ($ok, $msg) = $self->_Set( Field => 'Content', Value => $value );
-- if (!$ok) {
++
+ my ($old_value, $error) = $self->Content;
+ my $old_id = $self->id;
+ my ( $new_id, $new_msg ) = $self->_Create(
@@ -201,7 +199,9 @@
+ Content => $raw_value,
+ ContentType => $content_type,
+ );
-+
+
+- ($ok, $msg) = $self->_Set( Field => 'Content', Value => $value );
+- if (!$ok) {
+ unless ($new_id) {
$RT::Handle->Rollback;
- return ($ok, $self->loc("Unable to update [_1]: [_2]", $self->Name, $msg));
@@ -279,10 +279,11 @@
+ return ( 0, $self->loc("You cannot update [_1] using database config; you must edit your site config", $args{'Name'}) );
+ }
+
-+ if (ref ($args{'Content'}) ) {
-+ ($args{'Content'}, my $error) = $self->_SerializeContent($args{'Content'}, $args{'Name'});
++ if ( ref( $args{'Content'} ) ) {
++ ( $args{'Content'}, my $error ) =
++ $self->_SerializeContent( $args{'Content'}, $args{'Name'} );
+ if ($error) {
-+ return (0, $error);
++ return ( 0, $error );
+ }
+ $args{'ContentType'} = 'perl';
+ }
3: 2f97a2d642 = 3: a2d96f55bf Remove unused stringify function in configuration edit page
4: ea8a4c833a ! 4: a311918745 Page to view DB config transaction history
@@ -122,9 +122,9 @@
+<& /Admin/Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
+<div class="configuration history">
-+<& /Admin/Elements/ConfigHelp &>
-+<&|/Widgets/TitleBox, title => loc('History') &>
-+<div class="history-container">
++ <& /Admin/Elements/ConfigHelp &>
++ <&|/Widgets/TitleBox, title => loc('History') &>
++ <div class="history-container">
+% my $i = 1;
+% while (my $tx = $Transactions->Next()) {
+ <& /Elements/ShowTransaction,
@@ -138,8 +138,8 @@
+ &>
+% $i++;
+% }
-+</div>
-+</&>
++ </div>
++ </&>
+</div>
+
5: e3bd093371 = 5: 650b7b1234 Tests for DB config transactions and history
More information about the rt-commit
mailing list