# HG changeset patch # User bsw # Date 1643885261 -3600 # Node ID 7b04f14c6d0a0b7e7f42ea4e06d44cd2edae20a5 # Parent de3770da915eb2858418e1fe13ebeca5dfc4bb42 Check area configuration only for new issues diff -r de3770da915e -r 7b04f14c6d0a app/main/draft/new.lua --- a/app/main/draft/new.lua Thu Feb 03 11:37:06 2022 +0100 +++ b/app/main/draft/new.lua Thu Feb 03 11:47:41 2022 +0100 @@ -22,11 +22,6 @@ end end -if #(area.allowed_policies) < 1 then - slot.put_into("error", _"Subject area configuration invalid. Please contact the administrator.") - return false -end - local polling = param.get("polling", atom.boolean) local policy_id = param.get("policy_id", atom.integer) @@ -77,6 +72,12 @@ return false end +if not initiative and not issue and #(area.allowed_policies) < 1 then + slot.put_into("error", _"Subject area configuration invalid. Please contact the administrator.") + return false +end + + ui.form{ record = draft, attr = { class = "vertical section", enctype = 'multipart/form-data' },