Priority Values mapping issue in Security Incident Response

priyanka1028
Tera Contributor

Hi All,

 

I have configured Defender Field Translation for the Priority field, but the Security Incident priority is not being populated as expected. I have also added logs for debugging; however, the logs are not captured in the System Log table.

Could someone please help me troubleshoot this issue

 

priyanka1028_0-1786511654714.png

 

1 REPLY 1

kmohammed
Tera Guru

Hi Priyanka, the missing log line is the most important clue here. If no "WFT Defender priority sourceValue" line appears in the System Log at all, the translation script is not running for that incident, so the mapping logic itself is not yet being tested.

 

First, confirm the translation record is Active, that its destination field is Priority, and that the Defender integration profile in use actually references that translation record. Then search the System Log for "WFT Defender" without a user or narrow time filter, since the integration may log as a different user than the one you used to test.

 

Second, check the end of the script in your screenshot. It builds destinationValue ("1" through "5") and logs it, but it needs to return that value as the last line:

 

return destinationValue;

 

Without a return, the field translation has no value to apply, even if the score and severity mapping logic is correct. Priority is a choice value, so returning the strings "1" to "5" is the right form.

 

One more check on the two paths in that script: parseInt on a severity word such as "high" gives NaN, so that input must fall through to the severityMapping lookup, while a numeric score must take the threshold path. Test with one incident of each type after adding the return, and use the first log line to confirm which sourceValue actually arrived.