Actions
Bug #2003
closedSelect in PT editor throws exception if item name are not found
Status:
Rejected
Priority:
2
Assignee:
-
Category:
Web - Config management
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
If a <select> is configured in a PT, and a value not available in its list of item was saved at some point in the PI, then the SelectField editor failed with an exception.
In the following example, the select is defined like that:
<SELECT> <NAME>USERDIRPERM_USER_SETPERM</NAME> <DESCRIPTION>Set automatically permissions on this user directory</DESCRIPTION> <ITEM> <VALUE>setPerm</VALUE> LABEL>Set permissions on user directory</LABEL> </ITEM> </SELECT>
And the exception is:
java.util.NoSuchElementException: key not found: setPerms at scala.collection.MapLike$class.default(MapLike.scala:224) ~[scala-library-2.9.0-1.jar:na] at scala.collection.immutable.Map$Map1.default(Map.scala:106) ~[scala-library-2.9.0-1.jar:na] at scala.collection.MapLike$class.apply(MapLike.scala:135) ~[scala-library-2.9.0-1.jar:na] at scala.collection.immutable.Map$Map1.apply(Map.scala:106) ~[scala-library-2.9.0-1.jar:na] at com.normation.rudder.web.model.SelectField$$anonfun$3.apply(PolicyFieldEditors.scala:145) ~[classes/:na] at com.normation.rudder.web.model.SelectField$$anonfun$3.apply(PolicyFieldEditors.scala:145) ~[classes/:na] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34) ~[scala-library-2.9.0-1.jar:na] at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33) ~[scala-library-2.9.0-1.jar:na] at scala.collection.TraversableLike$class.map(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.mutable.WrappedArray.map(WrappedArray.scala:33) ~[scala-library-2.9.0-1.jar:na] at com.normation.rudder.web.model.SelectField.toForm(PolicyFieldEditors.scala:145) ~[classes/:na] at com.normation.rudder.web.model.SelectField.toForm(PolicyFieldEditors.scala:132) ~[classes/:na] at com.normation.rudder.web.model.PolicyField$class.toFormNodeSeq(PolicyEditor.scala:143) ~[classes/:na] at com.normation.rudder.web.model.SelectField.toFormNodeSeq(PolicyFieldEditors.scala:132) ~[classes/:na] at com.normation.rudder.web.model.SectionFieldImp$$anonfun$2.apply(PolicyEditor.scala:215) ~[classes/:na] at com.normation.rudder.web.model.SectionFieldImp$$anonfun$2.apply(PolicyEditor.scala:215) ~[classes/:na] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library-2.9.0-1.jar:na] at scala.collection.immutable.List.foreach(List.scala:45) ~[scala-library-2.9.0-1.jar:na] at scala.collection.TraversableLike$class.map(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.immutable.List.map(List.scala:45) ~[scala-library-2.9.0-1.jar:na] at com.normation.rudder.web.model.SectionFieldImp.toFormNodeSeq(PolicyEditor.scala:215) ~[classes/:na] at com.normation.rudder.web.model.MultivaluedSectionField$$anonfun$com$normation$rudder$web$model$MultivaluedSectionField$$showFormEntry$1.apply(PolicyEditor.scala:360) ~[classes/:na] at com.normation.rudder.web.model.MultivaluedSectionField$$anonfun$com$normation$rudder$web$model$MultivaluedSectionField$$showFormEntry$1.apply(PolicyEditor.scala:360) ~[classes/:na] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194) ~[scala-library-2.9.0-1.jar:na] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library-2.9.0-1.jar:na] at scala.collection.immutable.List.foreach(List.scala:45) ~[scala-library-2.9.0-1.jar:na]
Updated by François ARMAND almost 13 years ago
- Status changed from In progress to Discussion
- Target version changed from 2.3.2 to 18
Change to 2.4-ideas, as it seems:
- that <SELECT> are extremely rarely used in PT lib (0 time until now)
- it happens only when a PT is modified without upgrading its version, that is more likely a development task than an user one.
Updated by François ARMAND almost 13 years ago
- Target version changed from 18 to 24
Updated by Jonathan CLARKE over 12 years ago
- Target version changed from 24 to Ideas (not version specific)
Updated by François ARMAND almost 12 years ago
- Status changed from Discussion to 8
- Assignee deleted (
François ARMAND)
Updated by Benoît PECCATTE about 8 years ago
- Status changed from New to Rejected
This is not relevant for users and doesn't seem to happen anymore.
Actions