Skip to content

Conversation

@Timpan4
Copy link
Contributor

@Timpan4 Timpan4 commented Nov 7, 2025

Add comprehensive status filtering support and consolidate transaction fetching:

  • docs/maniphest-cli.md: Added a new 'Status Filtering' section with pattern syntax, examples, combining with other filters, negation, and metadata notes. Also updated examples to include --status usage and metadata.

  • phabfive/cli.py: Added --status option help text and examples in CLI usage, imported parse_status_patterns, parse status patterns from args, and wired status_patterns into task_search calls. Also updated --show-history description to include status history and show-metadata to indicate status matching.

  • phabfive/status_transitions.py: New module implementing StatusPattern parsing and matching, status ordering map, helper functions get_status_order, _parse_single_condition, parse_status_patterns, and StatusPattern class with matching logic for from/to/in/been/never/raised/lowered and negation support.

  • phabfive/maniphest.py: Reorganized imports, added transaction consolidation method _fetch_all_transactions to fetch columns/priority/status in one call, updated matching functions to accept pre-fetched transactions (_task_matches_priority_patterns, added _task_matches_status_patterns), updated _task_matches_any_pattern and task_search to use consolidated transactions, added status_transitions_map and matching_status_map handling, updated history and metadata builders to include status history and matched status booleans, and refactored history fetching to use consolidated method.

  • tests/test_status_transitions.py: Added comprehensive unit tests for status parsing and matching including orders, parsing errors, pattern combinations, and matching behavior.

  • tox.ini: Added py314 to envlist.

These changes implement status transition filtering end-to-end: CLI, parsing, matching, history display, tests, and docs. Tests and new module are isolated; transaction fetching consolidation touches maniphest to reduce API calls and integrate status handling.

@Timpan4 Timpan4 requested a review from holmboe November 7, 2025 10:18
@Timpan4 Timpan4 force-pushed the feature/status-filtering branch from 80feb35 to f08025d Compare November 10, 2025 14:05
@holmboe
Copy link
Contributor

holmboe commented Nov 10, 2025

LGTM

@Timpan4 Timpan4 force-pushed the feature/status-filtering branch from 185c7b3 to 89123bc Compare November 11, 2025 09:09
Add comprehensive status filtering support and consolidate transaction fetching:

- docs/maniphest-cli.md: Added a new 'Status Filtering' section with pattern syntax, examples, combining with other filters, negation, and metadata notes. Also updated examples to include --status usage and metadata.

- phabfive/cli.py: Added --status option help text and examples in CLI usage, imported parse_status_patterns, parse status patterns from args, and wired status_patterns into task_search calls. Also updated --show-history description to include status history and show-metadata to indicate status matching.

- phabfive/status_transitions.py: New module implementing StatusPattern parsing and matching, status ordering map, helper functions get_status_order, _parse_single_condition, parse_status_patterns, and StatusPattern class with matching logic for from/to/in/been/never/raised/lowered and negation support.

- phabfive/maniphest.py: Reorganized imports, added transaction consolidation method _fetch_all_transactions to fetch columns/priority/status in one call, updated matching functions to accept pre-fetched transactions (_task_matches_priority_patterns, added _task_matches_status_patterns), updated _task_matches_any_pattern and task_search to use consolidated transactions, added status_transitions_map and matching_status_map handling, updated history and metadata builders to include status history and matched status booleans, and refactored history fetching to use consolidated method.

- tests/test_status_transitions.py: Added comprehensive unit tests for status parsing and matching including orders, parsing errors, pattern combinations, and matching behavior.

- tox.ini: Added py314 to envlist.

These changes implement status transition filtering end-to-end: CLI, parsing, matching, history display, tests, and docs. Tests and new module are isolated; transaction fetching consolidation touches maniphest to reduce API calls and integrate status handling.
🔧 feat(status_transitions): Improve status order handling with API response

Enhance status transition logic to dynamically build status order from
Phabricator's maniphest.querystatuses API. Add fallback to hardcoded
order when API response is unavailable. Modify functions to accept
optional API response for more flexible status progression tracking.
🔧 Refactor: Update status order and test cases

Modify status order to reflect new workflow and update
corresponding test cases. Remove 'In Progress' and 'Stalled'
statuses, adjust order of 'Blocked', 'Wontfix', 'Invalid',
'Duplicate', and 'Resolved' statuses. Update test assertions
to match new status order and workflow.
@Timpan4 Timpan4 force-pushed the feature/status-filtering branch from 89123bc to 811caed Compare November 11, 2025 10:13
@Timpan4 Timpan4 merged commit 8e7056e into master Nov 11, 2025
15 checks passed
@Timpan4 Timpan4 deleted the feature/status-filtering branch November 11, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants