<commit_before>// Collection of all business processes of given type for given user which are not submitted

'use strict';

module.exports = function (user, bpType) {
	return user.businessProcesses.filter(function (bp) {
		return bp instanceof bpType;
	}).filterByKey('isSubmitted', true);
};
<commit_msg>#928 fixed logic<commit_after>// Collection of all business processes of given type for given user which are not submitted

'use strict';

module.exports = function (user, bpType) {
	return user.businessProcesses.filter(function (bp) {
		return bp instanceof bpType;
	}).filterByKey('isFromEregistrations', true).filterByKey('isSubmitted', true);
};

{'fraction_non_alphanumeric': 0.1083969465648855, 'fraction_numerical': 0.004580152671755725, 'mean_word_length': 5.626262626262626, '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': '3224254', 'n_tokens_mistral': 195, 'n_tokens_neox': 183, 'n_words': 65}