feat: add Source button to the task detail view

Tasks imported from a ticketing system now show a "Source ↗" button in the task
detail actions (same affordance as the atomization board), linking to the
upstream ticket. The small inline key link is kept too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
etalon
2026-06-13 12:34:11 +02:00
parent 46e2099542
commit c65aeb4bac
+12
View File
@@ -147,6 +147,18 @@ function renderActions() {
catch (e) { toast(e.message, 'err'); } catch (e) { toast(e.message, 'err'); }
}; };
// link to the upstream ticket (same affordance as the atomization board)
if (t.external && t.external.url) {
const a = document.createElement('a');
a.className = 'btn';
a.style.marginRight = '8px';
a.href = t.external.url;
a.target = '_blank';
a.rel = 'noopener';
a.textContent = 'Source ↗';
host.appendChild(a);
}
if (root.dataset.isDeveloper === '1') { if (root.dataset.isDeveloper === '1') {
if (t.status === 'published' && !myClaim()) add('Request assignment', post('claim', { note: '' }), true); if (t.status === 'published' && !myClaim()) add('Request assignment', post('claim', { note: '' }), true);
if (myClaim() && ['published', 'claim_requested'].includes(t.status)) add('Withdraw request', post('claim/withdraw')); if (myClaim() && ['published', 'claim_requested'].includes(t.status)) add('Withdraw request', post('claim/withdraw'));