mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Add "id:xxx" search
This commit is contained in:
@@ -255,6 +255,20 @@ class GroupCollector implements GroupCollectorInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limit the result to a set of specific transaction groups.
|
||||||
|
*
|
||||||
|
* @param array $groupIds
|
||||||
|
*
|
||||||
|
* @return GroupCollectorInterface
|
||||||
|
*/
|
||||||
|
public function setIds(array $groupIds): GroupCollectorInterface {
|
||||||
|
|
||||||
|
$this->query->whereIn('transaction_groups.id', $groupIds);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit the number of returned entries.
|
* Limit the number of returned entries.
|
||||||
*
|
*
|
||||||
|
@@ -240,6 +240,15 @@ interface GroupCollectorInterface
|
|||||||
*/
|
*/
|
||||||
public function setJournalIds(array $journalIds): GroupCollectorInterface;
|
public function setJournalIds(array $journalIds): GroupCollectorInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limit the result to a set of specific transaction groups.
|
||||||
|
*
|
||||||
|
* @param array $groupIds
|
||||||
|
*
|
||||||
|
* @return GroupCollectorInterface
|
||||||
|
*/
|
||||||
|
public function setIds(array $groupIds): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit the number of returned entries.
|
* Limit the number of returned entries.
|
||||||
*
|
*
|
||||||
|
@@ -332,6 +332,10 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
$parts = explode(',', $value);
|
$parts = explode(',', $value);
|
||||||
$this->collector->setJournalIds($parts);
|
$this->collector->setJournalIds($parts);
|
||||||
break;
|
break;
|
||||||
|
case 'id':
|
||||||
|
$parts = explode(',', $value);
|
||||||
|
$this->collector->setIds($parts);
|
||||||
|
break;
|
||||||
case 'destination_account_starts':
|
case 'destination_account_starts':
|
||||||
$this->searchAccount($value, 2, 1);
|
$this->searchAccount($value, 2, 1);
|
||||||
break;
|
break;
|
||||||
|
@@ -482,6 +482,7 @@ return [
|
|||||||
'any_notes' => ['alias' => false, 'needs_context' => false,],
|
'any_notes' => ['alias' => false, 'needs_context' => false,],
|
||||||
|
|
||||||
// one exact (or array of) journals:
|
// one exact (or array of) journals:
|
||||||
|
'id' => ['alias' => false, 'trigger_class' => null, 'needs_context' => true,],
|
||||||
'journal_id' => ['alias' => false, 'trigger_class' => null, 'needs_context' => true,],
|
'journal_id' => ['alias' => false, 'trigger_class' => null, 'needs_context' => true,],
|
||||||
|
|
||||||
// exact amount
|
// exact amount
|
||||||
|
Reference in New Issue
Block a user