feat(jira): add editable jira_email field per user
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled

Users can now set a separate Atlassian email for Jira authentication
in Settings → Profile → Jira Integration. Falls back to the Aegis
account email when not set, so existing setups are unaffected.

- Migration b043: adds jira_email column to users table
- User model/schema: expose jira_email read/write
- jira_service: _effective_jira_email() uses jira_email ?? email
- Frontend: replaces read-only email display with editable input

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
kitos
2026-05-26 16:40:46 +02:00
parent f316a249cc
commit 217c4c88b2
7 changed files with 85 additions and 19 deletions

View File

@@ -40,8 +40,8 @@ def update_my_preferences(
"""
update_data = payload.model_dump(exclude_unset=True)
for field, value in update_data.items():
if field == "jira_api_token":
# Empty string means "clear token"
if field in ("jira_api_token", "jira_email"):
# Empty string means "clear the value"
setattr(current_user, field, value if value else None)
else:
setattr(current_user, field, value)