Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bestpractical/rt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsunnavy <sunnavy@bestpractical.com>2020-07-13 22:49:40 +0300
committersunnavy <sunnavy@bestpractical.com>2020-07-14 03:05:20 +0300
commit92ead9ceb1c8e5971cb5308706a9af1ddf6b6bb0 (patch)
tree07fda1580d5df8d876b24097fb7a02ac85bf17a3
parentbde1b96903253bbb914b60baa9e58a693b47adfe (diff)
Store the attribute Name in the ContentHistory's Description field4.4/shared-setting-txn
With this, we can easily identify the type of shared settings like SavedSearch, Dashboard, etc.
-rw-r--r--lib/RT/Attribute.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index c2471f3e5e..643e31c717 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -200,8 +200,9 @@ sub Create {
my ( $ret, $msg ) = $self->_NewTransaction( Type => 'Create' );
if ($ret) {
( $ret, $msg ) = $self->AddAttribute(
- Name => 'ContentHistory',
- Content => $args{'ContentType'} eq 'storable'
+ Name => 'ContentHistory',
+ Description => $self->Name,
+ Content => $args{'ContentType'} eq 'storable'
? $self->_DeserializeContent( $args{'Content'} )
: $args{'Content'},
);
@@ -501,8 +502,9 @@ sub _Set {
else {
RT->Logger->debug("Couldn't find ContentHistory, creating one from old value");
my ( $ret, $msg ) = $self->AddAttribute(
- Name => 'ContentHistory',
- Content => $self->__Value('ContentType') eq 'storable'
+ Name => 'ContentHistory',
+ Description => $self->Name,
+ Content => $self->__Value('ContentType') eq 'storable'
? $self->_DeserializeContent($old_value)
: $old_value,
);
@@ -516,8 +518,9 @@ sub _Set {
if ( $return[0] ) {
my ( $ret, $msg ) = $self->AddAttribute(
- Name => 'ContentHistory',
- Content => $self->__Value('ContentType') eq 'storable'
+ Name => 'ContentHistory',
+ Description => $self->Name,
+ Content => $self->__Value('ContentType') eq 'storable'
? $self->_DeserializeContent( $args{'Value'} )
: $args{'Value'},
);