Skip to content

Conversation

@luca-bellenghi
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors duplicate code for checking empty rich text fields by introducing a centralized text_in_block() utility function. The changes consolidate similar logic across three check utility files (notizie, luoghi, and eventi) that was previously checking for empty block content inline.

Key changes:

  • Replaced inline block text extraction with calls to text_in_block() utility
  • Added import for text_in_block from design.plone.contenttypes.utils in three files
  • Updated CHANGES.rst with release notes

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
check_notizie.py Replaced inline logic for checking empty descrizione_estesa with text_in_block() call
check_luoghi.py Replaced inline logic for checking empty modalita_accesso with text_in_block() call
check_eventi.py Replaced inline logic for checking empty prezzo with text_in_block() call
CHANGES.rst Added release notes documenting the fixes for empty rich text checking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link

coveralls commented Oct 30, 2025

Pull Request Test Coverage Report for Build 18965384374

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 6 (50.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 68.754%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/design/plone/contenttypes/browser/utils/check_eventi.py 1 2 50.0%
src/design/plone/contenttypes/browser/utils/check_luoghi.py 1 2 50.0%
src/design/plone/contenttypes/browser/utils/check_notizie.py 1 2 50.0%
Totals Coverage Status
Change from base Build 18276136104: 0.1%
Covered Lines: 3382
Relevant Lines: 4919

💛 - Coveralls

luca-bellenghi and others added 3 commits October 31, 2025 08:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@luca-bellenghi luca-bellenghi merged commit 5379443 into main Oct 31, 2025
10 checks passed
@luca-bellenghi luca-bellenghi deleted the bug71105_fix_check_views branch October 31, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants