State:New|TargetRelease:No Target|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:385311|
Problem summary
When using a Mapping Popup Menu widget to display a parameter, a warning icon is typically shown to alert the user when a value they have chosen (for example by setting it via Python) is not one of the options provided:

However, for String parameters displayed using Mapping Popup Menu widgets, this warning icon is not shown if the value is set to a string that is used as a key in the options hint dictionary.
For example, when mapping the display values a, b and c onto the actual values x, y and z, the XML representation of the string parameter is as follows:
<string_parameter hints="{'options__order': ['a', 'b', 'c'], 'widget': 'mapper', 'options': {'a': 'x', 'c': 'y', 'b': 'z'}}" name="newParameter" value="x"/>
When setting the value of such a parameter via Python and the value is specified as anything that's not part of the available options, this parameter is displayed in the UI as follows:

However, if the value is set to a display name instead of a value as specified in the hints dictionary, this is not marked in the UI.
If setting the parameter value in this example to either "a" or "x" via Python results in the parameter value being shown in the UI as "a", but the underlying parameter value being different:

>>> NodegraphAPI.GetNode('Group').getParameter('user.newParameter').getValue(0)a
vs
>>> NodegraphAPI.GetNode('Group').getParameter('user.newParameter').getValue(0)x
Customer reported version
Katana 3.1v2
Customer reported platform
CentOS 6
Steps to reproduce

NodegraphAPI.GetNode('Group').getParameter('user.newParameter').getValue(0)
Use the following Python code to set the value to "a":
NodegraphAPI.GetNode('Group').getParameter('user.newParameter').setValue("a", 0)
Expected behaviour
The value of the parameter is set to "a". A warning icon appears in the Parameters tab to indicate that the current parameter value is not an available option.
Actual behaviour
The value of the parameter is set to "a". There is no warning icon in the Parameters tab to alert the user that the value they have chosen is unavailable.
Workaround
Before setting the value of a Mapping Popup parameter via Python, verify the available value options by looking at the widget options in the XML representation of the parameter, for example as follows:
NodegraphAPI.GetNode('Group').getParameter('user.newParameter').getXML()
Note that it may be necessary to supply strings containing integers as the value if the parameter is of type String.
Reproduced by support
Katana 3.1v3 - CentOS 7 - Windows 10
Katana 3.0v8 - CentOS 7 - Windows 10
Katana 3.0v1 - CentOS 7 - Windows 10
Katana 2.5v1 - CentOS 7 - Windows 10
Katana 2.0v1 - CentOS 7
Katana 1.6v3 - CentOS 7
We're sorry to hear that
Please tell us why