Mercurial > p > roundup > code
comparison roundup/hyperdb.py @ 6250:95183d73ac64
issue2550522 - add transitive searching to filter in roundup-admin
issue2550522 - Add 'filter' command to command-line interface.
Filter command was actually added in 2.0.0, but this
issue requested transitive searching. So that:
roundup-admin -i . filter issue assignedto.username=Admin
will work. This also fixes two bugs.
If assignedto.username had no matches, all issues would be returned.
admin.py had a find() call where the should have been a filter()
call. Was tripped when -S, -c or -s were used.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 05 Aug 2020 02:05:10 -0400 |
| parents | 6834bb5473da |
| children | 1e5ed659e8ca 8bc5faeb7677 |
comparison
equal
deleted
inserted
replaced
| 6249:3b62c35e824d | 6250:95183d73ac64 |
|---|---|
| 618 subst.append(v) | 618 subst.append(v) |
| 619 if exact: | 619 if exact: |
| 620 exact_match_spec[p.name] = exact | 620 exact_match_spec[p.name] = exact |
| 621 if subst: | 621 if subst: |
| 622 filterspec[p.name] = subst | 622 filterspec[p.name] = subst |
| 623 elif not exact: # don't set if we have exact criteria | |
| 624 filterspec[p.name] =[ '-1' ] # no match was found | |
| 623 else: | 625 else: |
| 624 assert not isinstance(p.val, Exact_Match) | 626 assert not isinstance(p.val, Exact_Match) |
| 625 filterspec[p.name] = p.val | 627 filterspec[p.name] = p.val |
| 626 self.val = self.cls._filter(search_matches, filterspec, sort and self, | 628 self.val = self.cls._filter(search_matches, filterspec, sort and self, |
| 627 retired=retired, | 629 retired=retired, |
