$('#showData').on('change', '.picker-select', function(e)
{
    var id    = $(this).attr('id');
    var field = $(this).attr('data-field');
    var executionID = $(this).val();
    var num = Number(id.replace(/[^\d]/g, " "));

    if(field === 'execution')
    {
        if(typeof(num) == 'undefined') num = '';

        var productID = $(document.getElementById('product[' + num + ']')).val()
        var branch    = $(document.getElementById('branch[' + num + ']')).val()

        if(typeof(branch) == 'undefined') branch = 0;
        if(typeof(oldStoryID) == 'undefined') oldStoryID = 0;

        var link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=' + productID + '&branch=' + branch + '&moduleID=0&storyID=' + oldStoryID + '&number=' + num + '&type=full&status=all&from=bug');
        $.get(link, function(stories)
        {
            $('#story' + num).next('.picker').remove();
            $('#story' + num).replaceWith(stories);
            $('#story' + num).picker({chosenMode: true});
            $('#story' + num).attr('isInit', true);
        })
    }
});
