Issue Service
Core issue tracking service with workflow states, assignments, and SLA management for the issue tracker platform.
Service Structure
src/
├── core/
│ ├── config.py # Configuration settings
│ └── __init__.py # Package exports
├── domain/
│ ├── issue.py # Issue domain model
│ ├── sla.py # SLA domain model
│ ├── workflow.py # Workflow state machine
│ └── __init__.py # Package exports
├── events/
│ ├── publisher.py # Event publishers
│ └── __init__.py # Package exports
├── models/
│ ├── IssueModel # Issue database model
│ ├── SLAModel # SLA database model
│ ├── WorkflowModel # Workflow definition model
│ └── __init__.py # Package exports
├── repositories/
│ ├── IssueRepository # Issue CRUD operations
│ ├── SLARepository # SLA CRUD operations
│ └── __init__.py # Package exports
├── routers/
│ ├── issue_router.py # Issue API routes
│ ├── workflow_router.py # Workflow API routes
│ └── __init__.py # Package exports
├── services/
│ ├── IssueService # Issue business logic
│ ├── SLAService # SLA business logic
│ ├── WorkflowService # Workflow business logic
│ └── __init__.py # Package exports
├── database.py # Database connection
├── main.py # FastAPI application entrypoint
└── __init__.py # Package exports
Features
Issue Management
- Issue CRUD: Create, read, update, delete issues
- Issue Types: Bug, Feature, Task, Epic, Story
- Priority Levels: Critical, High, Medium, Low
- Status Workflow: Customizable state transitions
- Assignments: Assign issues to users/teams
- Labels/Tags: Categorize issues
- Attachments: File attachments support
- Comments: Threaded discussions
- Watchers: Subscribe to issue updates
Workflow Engine
- State Machine: Configurable workflow states
- Transitions: Valid state transitions with conditions
- Automation: Auto-transition on events
- Custom Workflows: Per-project workflows
SLA Management
- SLA Policies: Define response/resolution targets
- SLA Tracking: Monitor SLA compliance
- Escalation: Auto-escalate breached SLAs
- Business Hours: Configure working hours
- Holiday Calendar: Exclude holidays from SLA
Event Integration
- Issue Events: Publishes issue.created, issue.updated, issue.deleted, issue.status_changed, issue.assigned
- SLA Events: Publishes sla.breached, sla.warning
- Consumes Events: Listens for project, user, comment events
API Endpoints
Issues
Create Issue
POST /api/v1/projects/{project_id}/issues
Content-Type: application/json
{
"title": "Login page not loading",
"description": "Users cannot access login page",
"issue_type": "bug",
"priority": "high",
"assignee_id": "uuid",
"labels": ["frontend", "urgent"],
"due_date": "2024-01-20T10:00:00Z"
}
Get Issue
GET /api/v1/issues/{issue_id}
Response:
{
"id": "uuid",
"project_id": "uuid",
"title": "Login page not loading",
"description": "Users cannot access login page",
"issue_type": "bug",
"priority": "high",
"status": "open",
"assignee_id": "uuid",
"reporter_id": "uuid",
"labels": ["frontend", "urgent"],
"due_date": "2024-01-20T10:00:00Z",
"workflow_state": "open",
"sla_deadline": "2024-01-18T10:00:00Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Update Issue
PATCH /api/v1/issues/{issue_id}
Content-Type: application/json
{
"status": "in_progress",
"assignee_id": "uuid",
"priority": "critical"
}
Delete Issue
DELETE /api/v1/issues/{issue_id}
List Issues
GET /api/v1/issues?project_id={project_id}&status=open&priority=high&skip=0&limit=20
Query Parameters:
- project_id: uuid (required)
- status: string (optional)
- priority: string (optional)
- assignee_id: uuid (optional)
- issue_type: string (optional)
- labels: string (comma-separated)
- skip: int (default: 0)
- limit: int (default: 20, max: 100)
- sort: string (default: -created_at)
Workflow
Get Workflow
GET /api/v1/projects/{project_id}/workflow
Update Workflow
PUT /api/v1/projects/{project_id}/workflow
Content-Type: application/json
{
"states": [
{"name": "open", "type": "start"},
{"name": "in_progress", "type": "intermediate"},
{"name": "in_review", "type": "intermediate"},
{"name": "done", "type": "end"}
],
"transitions": [
{"from": "open", "to": "in_progress"},
{"from": "in_progress", "to": "in_review"},
{"from": "in_review", "to": "done"},
{"from": "in_review", "to": "in_progress"}
]
}
Transition Issue
POST /api/v1/issues/{issue_id}/transition
Content-Type: application/json
{
"to_state": "in_progress"
}
SLA
Create SLA Policy
POST /api/v1/projects/{project_id}/sla
Content-Type: application/json
{
"name": "Critical Bug SLA",
"issue_type": "bug",
"priority": "critical",
"response_time_hours": 1,
"resolution_time_hours": 4,
"business_hours": {
"timezone": "UTC",
"monday": {"start": "09:00", "end": "17:00"},
...
}
}
Get SLA Status
GET /api/v1/issues/{issue_id}/sla
Configuration
Environment variables (in .env):
# Service
SERVICE_NAME=issue-service
SERVICE_VERSION=1.0.0
ENVIRONMENT=development
# Database
DATABASE_URL=postgresql+asyncpg://postgres:postgres_password@postgres:5432/issue_tracker
# Redis
REDIS_URL=redis://redis:6379/0
# RabbitMQ
RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
# Observability
JAEGER_ENABLED=false
JAEGER_HOST=jaeger
JAEGER_PORT=6831
Health Check
GET /health
Response:
{
"status": "healthy",
"service": "issue-service",
"version": "1.0.0"
}
Development
Running the Service
pip install -r requirements.txt
uvicorn src.main:app --reload --host 0.0.0.0 --port 8000
# Or using Docker
docker build -f Dockerfile -t issue-service .
docker run -p 8004:8000 --env-file .env issue-service
Testing
pytest tests/
pytest --cov=src tests/
Metadata
Release files for issue-service-byom 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| issue_service_byom-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for issue_service_byom-1.0.1-py3-none-any.whl |
Release files / issue_service_byom-1.0.1-py3-none-any.whl
| Download URL | issue_service_byom-1.0.1-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a83813277fba35425e6756e6508cd9c12330166fbdd620960dd5849e68df3ebe
|
|
BLAKE2b-256 checksum How to use checksums |
f0e297a11f69e34c16747f39d3fd08fc75d143fcc03120690e1133bc1ebee320
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logSecurity for issue-service-byom 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for issue_service_byom-1.0.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.