markjanstice commented on issue #6221:
URL: https://github.com/apache/jmeter/issues/6221#issuecomment-4092233450

   This commit 
https://github.com/apache/jmeter/pull/6199/changes/9b258623b07962195230fa9cd416120967ea7d4f
 changed AbstractJMeterGuiComponent.java which sets the enabled attribute to 
null if true, essentially that means the attribute is no longer included when 
serializing to the jmx file when saved, so it can disappear. 
   I've not debugged the code, but it seems when a node is clicked in the 
JMeter UI modifyTestElement is called, and that calls the affected 
modifyTestElementEnabledAndComment.
   This is the line in question:
   `mc.set(TestElementSchema.INSTANCE.getEnabled(), enabled ? null : 
Boolean.FALSE);`
   The comment in the code above that line implies it doesn't have to be this 
way:
   ```
   // We can skip storing "enabled" state if it's true, as it's default value.
   // JMeter removes disabled elements early from the tree, so configuration 
elements
   // with enabled=false (~HTTP Request Defaults) can't unexpectedly override 
the regular ones
   // like HTTP Request.
   
   ```
   However there may be fallout that I haven't considered by reverting back to:
   `mc.setEnabled(enabled);`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to