Skip to content

Fixed a solution added even though the required fields were not filled in#7

Open
Lainow wants to merge 5 commits intomainfrom
fix-added-solution-when-requiredfield-is-undefined
Open

Fixed a solution added even though the required fields were not filled in#7
Lainow wants to merge 5 commits intomainfrom
fix-added-solution-when-requiredfield-is-undefined

Conversation

@Lainow
Copy link
Contributor

@Lainow Lainow commented Mar 23, 2026

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes
  • Here is a brief description of what this PR does
    Fixed an issue where adding a solution was not blocked even when the ticket's required fields were not filled out. The ticket was indeed prevented from being closed, but the solution had already been added before the fields were validated.

Screenshots (if appropriate):

@Lainow Lainow self-assigned this Mar 23, 2026
@Lainow Lainow requested review from Rom1-B and stonebuzz March 23, 2026 14:10
}

public static function requireFieldsToClose(CommonDBTM $item): void
public static function requireFieldsToClose(CommonDBTM $item, bool $is_solution = false): bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Why add $is_solution? It is never set. It is always false.

Suggested change
public static function requireFieldsToClose(CommonDBTM $item, bool $is_solution = false): bool
public static function requireFieldsToClose(CommonDBTM $item): bool

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.

2 participants