Add search support for SEPA CT

This commit is contained in:
Janne Heß 2022-11-27 16:48:47 +01:00
parent 04c71a2e9e
commit dcfcbfd9b5
No known key found for this signature in database
GPG Key ID: 69165158F05265DF
4 changed files with 20 additions and 0 deletions

View File

@ -699,4 +699,17 @@ trait MetaCollection
return $this;
}
/**
* @inheritDoc
*/
public function setSepaCT(string $sepaCT): GroupCollectorInterface
{
$this->joinMetaDataTables();
$this->query->where('journal_meta.name', '=', 'sepa_ct_id');
$this->query->where('journal_meta.data', '=', sprintf('%s', json_encode($sepaCT)));
$this->query->whereNull('journal_meta.deleted_at');
return $this;
}
}

View File

@ -863,6 +863,9 @@ class OperatorQuerySearch implements SearchInterface
case 'attachment_notes_ends':
$this->collector->attachmentNotesEnds($value);
break;
case 'sepa_ct_is':
$this->collector->setSepaCT($value);
break;
}

View File

@ -229,5 +229,6 @@ return [
'attachment_notes_start' => ['alias' => true, 'alias_for' => 'attachment_notes_starts', 'needs_context' => true],
'attachment_notes_ends' => ['alias' => false, 'needs_context' => true],
'attachment_notes_end' => ['alias' => true, 'alias_for' => 'attachment_notes_ends', 'needs_context' => true],
'sepa_ct_is' => ['alias' => false, 'needs_context' => true],
],
];

View File

@ -501,6 +501,7 @@ return [
'search_modifier_attachment_notes_contains' => 'Any attachment\'s notes contain ":value"',
'search_modifier_attachment_notes_starts' => 'Any attachment\'s notes start with ":value"',
'search_modifier_attachment_notes_ends' => 'Any attachment\'s notes end is ":value"',
'search_modifier_sepa_ct_is' => 'SEPA CT is ":value"',
'update_rule_from_query' => 'Update rule ":rule" from search query',
'create_rule_from_query' => 'Create new rule from search query',
'rule_from_search_words' => 'The rule engine has a hard time handling ":string". The suggested rule that fits your search query may give different results. Please verify the rule triggers carefully.',
@ -723,6 +724,8 @@ return [
'rule_trigger_no_external_url_choice' => 'Transaction has no external URL',
'rule_trigger_id_choice' => 'Transaction ID is..',
'rule_trigger_id' => 'Transaction ID is ":trigger_value"',
'rule_trigger_sepa_ct_is_choice' => 'SEPA CT is..',
'rule_trigger_sepa_ct_is' => 'SEPA CT is ":trigger_value"',
// new values:
'rule_trigger_user_action_choice' => 'User action is ":trigger_value"',