<commit_before>var startDate;
var endDate;
var validationRuleGroupId;
var sendAlerts;
var organisationUnitId;

function organisationUnitSelected( ids )
{
    organisationUnitId = ids[0];
}

function validateRunValidation()
{
	startDate = $( '#startDate' ).val();
	endDate = $( '#endDate' ).val();
	validationRuleGroupId = $( '#validationRuleGroupId' ).val();
	sendAlerts =  $( '#sendAlerts' ).is( ':checked' );

	$.getJSON( 'validateRunValidation.action', 
	{ 
		startDate:startDate, 
		endDate:endDate
	}, 
	function( json )
	{
		if ( json.response == 'success' )
	    {
		    $( '#validateButton' ).attr( 'disabled', true )

	        setHeaderWaitMessage( i18n_analysing_please_wait );

	        $.get( 'runValidationAction.action', 
	        { 
	        	organisationUnitId: organisationUnitId, 
	        	startDate:startDate, endDate:endDate, 
	        	validationRuleGroupId: validationRuleGroupId,
	        	sendAlerts: sendAlerts<commit_msg>Fixed a bug where notifications wouldnt be sent even if the checkbox was checked<commit_after>var startDate;
var endDate;
var validationRuleGroupId;
var sendNotifications;
var organisationUnitId;

function organisationUnitSelected( ids )
{
    organisationUnitId = ids[0];
}

function validateRunValidation()
{
	startDate = $( '#startDate' ).val();
	endDate = $( '#endDate' ).val();
	validationRuleGroupId = $( '#validationRuleGroupId' ).val();
    sendNotifications =  $( '#sendNotifications' ).is( ':checked' );

	$.getJSON( 'validateRunValidation.action', 
	{ 
		startDate:startDate, 
		endDate:endDate
	}, 
	function( json )
	{
		if ( json.response == 'success' )
	    {
		    $( '#validateButton' ).attr( 'disabled', true )

	        setHeaderWaitMessage( i18n_analysing_please_wait );

	        $.get( 'runValidationAction.action', 
	        { 
	        	organisationUnitId: organisationUnitId, 
	        	startDate:startDate, endDate:endDate, 
	        	validationRuleGroupId: validationRuleGroupId,
                sendNotifications: sendNotifications
{'fraction_non_alphanumeric': 0.12157448928749377, 'fraction_numerical': 0.0029895366218236174, 'mean_word_length': 3.724705882352941, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6208389', 'n_tokens_mistral': 646, 'n_tokens_neox': 591, 'n_words': 122}