[Rt-commit] rt branch, 4.0/cf-spurious-update, created. rt-4.0.0-180-gdb025dd

Shawn Moore sartak at bestpractical.com
Wed May 4 13:43:49 EDT 2011


The branch, 4.0/cf-spurious-update has been created
        at  db025dddbfa37df845e14c2ec279657cb472171b (commit)

- Log -----------------------------------------------------------------
commit db025dddbfa37df845e14c2ec279657cb472171b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed May 4 13:43:05 2011 -0400

    Only update BasedOn if it's different
    
        Otherwise you'll get spurious "That is already the current value"
        (or "the current value-is-already That") messages

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 44a2f67..fc206e1 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -218,8 +218,10 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {
         $CustomFieldObj->SetRenderType( undef );
     }
 
-    my ($good, $msg) = $CustomFieldObj->SetBasedOn( $BasedOn );
-    push @results, $msg unless $good or $msg =~ /No entry found/;
+    if (($CustomFieldObj->BasedOn||'') ne ($BasedOn||'')) {
+        my ($good, $msg) = $CustomFieldObj->SetBasedOn( $BasedOn );
+        push @results, $msg unless $good or $msg =~ /No entry found/;
+    }
 
     my $paramtag = "CustomField-". $CustomFieldObj->Id ."-Value";
     # Delete any fields that want to be deleted

-----------------------------------------------------------------------


More information about the Rt-commit mailing list