diff --git a/templates/projects/board.html b/templates/projects/board.html index c7082ed..2b575ec 100644 --- a/templates/projects/board.html +++ b/templates/projects/board.html @@ -36,6 +36,7 @@ filterOpen: false, manageStatusesOpen: false, permissionsOpen: false, + automationOpen: false, allowedMoveToStatusIds: {{ allowed_move_to_status_ids }}, createStatusName: '', @@ -322,6 +323,9 @@ class="space-y-6" + @@ -859,6 +863,8 @@ class="space-y-6" +{% include "projects/partials/board_automation_modal.html" %} + {% endif %} {% endblock %} diff --git a/templates/projects/detail.html b/templates/projects/detail.html index 94a4068..27b3574 100644 --- a/templates/projects/detail.html +++ b/templates/projects/detail.html @@ -24,8 +24,22 @@
Back - Project Board - + Board + + + {% if is_admin %} + + + + {% endif %} Edit
@@ -793,8 +807,10 @@

Superadmin and manager roles always have full access. Select the statuses a developer role can move tickets to.

- + + +{% include "projects/partials/board_automation_modal.html" with selected_project=project %} {% endblock %} @@ -811,6 +827,7 @@ viewNoteData: { id: '', title: '', content: '' }, manageStatusesOpen: false, permissionsOpen: false, + automationOpen: false, createStatusName: '', createStatusColor: '#6B7280', createStatusOrder: '0', diff --git a/templates/projects/partials/board_automation_modal.html b/templates/projects/partials/board_automation_modal.html new file mode 100644 index 0000000..54fb20e --- /dev/null +++ b/templates/projects/partials/board_automation_modal.html @@ -0,0 +1,159 @@ +{% load static %} + +
+
+
+
+

Automation Rules

+ +
+ + +
+ {% csrf_token %} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + + +
+ +
+
+ + + {% if automation_rules %} +
+ + + + + + + + + + + + {% for rule in automation_rules %} + + + + + + + + {% endfor %} + +
NameTriggerActionsActiveDelete
{{ rule.name }} + When status becomes + {% if rule.trigger_status %} + + {{ rule.trigger_status.name }} + + {% else %} + any + {% endif %} + + {% for action in rule.actions %} + + {% if action.type == 'assign_user' %} Assign{% elif action.type == 'change_status' %} Change status{% elif action.type == 'notify_in_app' %} Notify{% elif action.type == 'send_email' %} Email{% else %}{{ action.type }}{% endif %} + + {% empty %} + none + {% endfor %} + +
+ {% csrf_token %} + +
+
+
+ {% csrf_token %} + +
+
+
+ {% else %} +

No automation rules configured yet. Add one above.

+ {% endif %} +
+