Daniel Beck commented on Bug JENKINS-25175

The issue at hand is that changes made via the web interface triggers ItemListener events based on fields that have been changed. On the other hand, the REST API is just a way to upload a new config file, so it uses the SaveableListener which is rather dumb and fire an event which has the whole new XML file. Ie SaveableListener is a gross generalization while ItemListener is thiner. … I think the events need finer informations (such as a Label object, not a whole config file).

ItemListener does not tell you which properties were changed. it tells you only the Item that changed, while SaveableListener tells you the Saveable that changed (same object as the Item in this case) and the config XML. I don't see why you think the former includes more specific information.

I would expect uploading a config file to behave exactly the same as doing a change via the web interface form.

Where does this expectation come from? POSTing to config.xml simply provides a new config file, containing often undocumented, internal data structure representations, which will then be loaded. The other processes a submitted form, can transform inputs, etc. The inputs are completely different, the processing is (necessarily) completely different, so any expectation of these behaving in any way alike has no basis in reality.

Would it make sense to have the REST API to fire the ItemListener events as well?

Possibly.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to