-
Bug
-
Resolution: Fixed
-
Major
-
None
I have a job triggered by CI Event (JMS Messaging provider). The job has a declared parameter CI_MESSAGE of type Multi-line String Parameter, according the config.xml of the job, the parameter is
<hudson.model.TextParameterDefinition> <name>CI_MESSAGE</name> <description></description> <defaultValue></defaultValue> </hudson.model.TextParameterDefinition>
When the job is triggered by this plugin, it very ofter puts the content of this parameter as a String, according the build.xml as:
<hudson.model.StringParameterValue> <name>CI_MESSAGE</name> <value>...content...</value> </hudson.model.StringParameterValue>
although the definition in the same build.xml still says:
<hudson.model.TextParameterDefinition> <name>CI_MESSAGE</name> <description></description> <defaultValue></defaultValue> </hudson.model.TextParameterDefinition> </parameterDefinitions>
Very rare the parameter is correctly stored in build.xml as:
<hudson.model.TextParameterValue> <name>CI_MESSAGE</name> <description></description> <value>...content...</value> </hudson.model.TextParameterValue>
and the definition is the same as previous.
UI is confused and String parameter has a far different rendering than Text parameter.
It is related to the other weird state - when it put the content of the parameter as String, it separate each key=value pair to separate line, when it put the content of the parameter as Text, it squash all pairs to the one line as:
Content from hudson.model.StringParameterValue:
<value>build=aaa param2=128 url=foo</value>
Equal content from hudson.model.TextParameterValue:
<value>build=aaaparam2=128url=foo</value>
I don't know what is the source of CI_MESSAGE content, but it doesn't matter - the content type should be always TextParameter, not the other one (StringParameter).
I'd like to add that this is a huge problem for the job rebuild plugin. Because it seems to respect the type given by the jms-messaging-plugin instead of config.xml. This removes new lines from text parameter so job can't be effectively rebuilt.
P.S. maybe second part of description needs to be changed because removing of new lines happens with String rather than Text param. Or possibly I misread it.