Alerting

Why do Custom Alert Actions values of Yes or No in a selection take different values?

Path Finder

Is this a known bug?

Following along with the HipChat example code (linked below), if I change the Background Color control-group code to what is displayed in the first code snippet below, then action.hipchat.param.color takes on the values of 1 or 0 when saving the alert action form, instead of what I'd expect to be a "Yes" or "No" string value (respectively).

Excerpt of edited $SPLUNK_HOME$/etc/apps/hipchat_app/default/data/ui/alerts/hipchat.html
http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ModAlertsAdvancedExample

<div class="control-group">
    <label class="control-label" for="hipchat_color">Background Color</label>

    <div class="controls">
        <select id="hipchat_color" name="action.hipchat.param.color">
            <option value="Yes">Yes</option>
            <option value="No">No</option>
        </select>
        <span class="help-block">Change the background of the hipchat message.</span>
    </div>
</div>

This is an issue because when I go to pull up the alert action again, it does not load the correct param (the form expects a "Yes" or "No" value, but gets a 1 or 0).

As a workaround, I've had to edit the values to a 1 or 0 as such to get this to work as I expect it to:

<div class="control-group">
    <label class="control-label" for="hipchat_color">Background Color</label>

    <div class="controls">
        <select id="hipchat_color" name="action.hipchat.param.color">
            <option value="1">Yes</option>
            <option value="0">No</option>
        </select>
        <span class="help-block">Change the background of the hipchat message.</span>
    </div>
</div>
0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!