Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/URB-3568.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add dossier abandonne event for codt uniquelicence envclassone and envclasstwo

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Polish release note wording for clarity.

Current sentence has formatting/wording issues (uniquelicence envclassone, missing separators, missing accent in “abandonné”).

Suggested text
-Add dossier abandonne event for codt uniquelicence  envclassone and envclasstwo
+Add dossier abandonné event for codt_uniquelicence, envclassone, and envclasstwo.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Add dossier abandonne event for codt uniquelicence envclassone and envclasstwo
Add dossier abandonné event for codt_uniquelicence, envclassone, and envclasstwo.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@news/URB-3568.feature` at line 1, Update the release note text to use clear,
properly separated wording for the dossier abandonné event and correct the
spelling/accent. Replace the current phrasing in the note with a polished
sentence that mentions CODT, unique licence, envclassone, and envclasstwo as
distinct items, and ensure “abandonné” is accented correctly.

[WBoudabous]
9 changes: 9 additions & 0 deletions src/urban/events/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@
profile="urban.events:default"
/>

<genericsetup:upgradeStep
title="Import dossier abandonne event for codt_uniquelicence and envclass"
description=""
source="1005"
destination="1006"
handler=".migrations.install_dossier_abandonne_event"
profile="urban.events:default"
/>

</configure>
30 changes: 27 additions & 3 deletions src/urban/events/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def update_talcondition_on_events(context):
)
for brain in brains:
obj = brain.getObject()
if obj.TALCondition in (None, u"context/is_CODT2024"):
obj.TALCondition = u"here/is_CODT2024"
if obj.TALCondition in (None, "context/is_CODT2024"):
obj.TALCondition = "here/is_CODT2024"
logger.info("Update {0}".format(obj.absolute_url()))
logger.info("upgrade done!")

Expand All @@ -48,7 +48,7 @@ def install_roaddecree_procedure(context):
logger.info("starting : Import roaddecree events")
directory_path = os.path.dirname(os.path.realpath(__file__))
if "liege" not in utils.get_configs():
path="./profiles/config/standard/roaddecree/urbantemplates.json"
path = "./profiles/config/standard/roaddecree/urbantemplates.json"
utils.import_json_config(
json_path=os.path.normpath(os.path.join(directory_path, path)),
context=api.portal.get_tool("portal_urban"),
Expand Down Expand Up @@ -94,3 +94,27 @@ def install_bordering_licence_events(context):
)

logger.info("upgrade done!")


def install_dossier_abandonne_event(context):
logger.info("starting : Import dossier abandonne event for codt_uniquelicence")
if "liege" not in utils.get_configs():

# codt_uniquelicence
utils.import_all_config(
base_json_path="./profiles/config/standard/codt_uniquelicence",
handle_existing_content=utils.ExistingContent.UPDATE,
)

# envclassone
utils.import_all_config(
base_json_path="./profiles/config/standard/envclassone",
handle_existing_content=utils.ExistingContent.UPDATE,
)

# envclasstwo
utils.import_all_config(
base_json_path="./profiles/config/standard/envclasstwo",
handle_existing_content=utils.ExistingContent.UPDATE,
)
logger.info("upgrade done!")

Large diffs are not rendered by default.

Loading