Skip to content

Commit

Permalink
[#2077] TESTING Added action_required_deadline_days to OpenZaakConf…
Browse files Browse the repository at this point in the history
…ig and status notification
  • Loading branch information
Bart van der Schoor committed Feb 13, 2024
1 parent 7f74686 commit cdfd1e4
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/open_inwoner/openzaak/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class OpenZaakConfigAdmin(SingletonModelAdmin):
"fields": [
"zaak_max_confidentiality",
"document_max_confidentiality",
"action_required_deadline_days",
"max_upload_size",
"allowed_file_extensions",
"title_text",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.23 on 2024-02-13 10:54

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("openzaak", "0043_zaaktypestatustypeconfig_action_required"),
]

operations = [
migrations.AddField(
model_name="openzaakconfig",
name="action_required_deadline_days",
field=models.IntegerField(
default=15,
help_text="Aantal dagen voor gebruiker om actie te ondernemen.",
verbose_name="Standaard actie deadline termijn in dagen",
),
),
]
6 changes: 6 additions & 0 deletions src/open_inwoner/openzaak/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ class OpenZaakConfig(SingletonModel):
),
)

action_required_deadline_days = models.IntegerField(
verbose_name=_("Standaard actie deadline termijn in dagen"),
default=15,
help_text=_("Aantal dagen voor gebruiker om actie te ondernemen."),
)

class Meta:
verbose_name = _("Open Zaak configuration")

Expand Down
5 changes: 4 additions & 1 deletion src/open_inwoner/openzaak/notifications.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from datetime import timedelta
from datetime import date, timedelta
from typing import List

from django.conf import settings
Expand Down Expand Up @@ -572,11 +572,14 @@ def send_case_update_email(
reverse("cases:case_detail", kwargs={"object_id": str(case.uuid)})
)

config = OpenZaakConfig.get_solo()

template = find_template(template_name)
context = {
"identification": case.identification,
"type_description": case.zaaktype.omschrijving,
"start_date": case.startdatum,
"end_date": date.today() + timedelta(days=config.action_required_deadline_days),
"case_link": case_detail_url,
}
if extra_context:
Expand Down

0 comments on commit cdfd1e4

Please sign in to comment.