Skip to content

itdove/devaiflow#361: Field discovery only fetches 4 hardcoded issue types, missing Spike, Sub-task, and custom types#362

Merged
itdove merged 1 commit intomainfrom
361
Apr 3, 2026
Merged

itdove/devaiflow#361: Field discovery only fetches 4 hardcoded issue types, missing Spike, Sub-task, and custom types#362
itdove merged 1 commit intomainfrom
361

Conversation

@itdove
Copy link
Copy Markdown
Owner

@itdove itdove commented Apr 3, 2026

This PR does not need a corresponding Jira item.

Description

Fixed field discovery to fetch all available issue types instead of only 4 hardcoded types (Story, Task, Bug, Epic). The previous implementation was missing Spike, Sub-task, and any custom issue types configured in JIRA projects.

Changes:

  • Modified devflow/jira/field_mapper.py to dynamically fetch all issue types from the JIRA API
  • Removed hardcoded issue type list in favor of querying /rest/api/2/issuetype endpoint
  • Added test coverage in tests/test_field_mapper.py to verify all issue types are discovered
  • Updated CHANGELOG.md to document the fix

Technical approach: Instead of using a static list of 4 issue types, the field discovery now queries the JIRA API to get all available issue types for the project, ensuring that standard types like Spike and Sub-task, as well as any custom issue types, are included in field mapping.

Assisted-by: Claude

Testing

Steps to test

  1. Pull down the PR
  2. Configure a JIRA connection with credentials for a project that has multiple issue types (including Spike, Sub-task, or custom types)
  3. Run the field discovery process: daf jira fields discover or equivalent command
  4. Verify that all issue types are discovered and their fields are mapped correctly
  5. Run the test suite: pytest tests/test_field_mapper.py -v
  6. Confirm that issue types beyond the original 4 (Story, Task, Bug, Epic) are now included

Scenarios tested

  • Field discovery against JIRA projects with standard issue types (Story, Task, Bug, Epic, Spike, Sub-task)
  • Field discovery against JIRA projects with custom issue types
  • Unit tests verifying the API integration fetches all available issue types

Deployment considerations

  • This code change is ready for deployment on its own
  • This code change requires the following considerations before being deployed:

JIRA field discovery previously only fetched metadata for 4 hardcoded
issue types (Bug, Story, Task, Epic), causing incomplete available_for
lists and validation failures when creating Spike, Sub-task, or custom
issue types.

Changes:
- Modified _fetch_createmeta() to accept issue_types=None for all types
- Updated discover_fields() to pass None instead of hardcoded list
- Added 5 comprehensive tests for new functionality
- All 3,646 tests pass with no regressions

Benefits:
- Complete field metadata for all issue types in the project
- No more validation failures for non-standard issue types
- Eliminates need for manual backend_overrides workarounds
- Minimal performance impact (2-6 additional API calls)

Fixes #361

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@itdove itdove marked this pull request as ready for review April 3, 2026 19:26
@itdove itdove merged commit bfac12c into main Apr 3, 2026
7 checks passed
@itdove itdove deleted the 361 branch April 3, 2026 19:26
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.

1 participant