Skip to content

Conversation

@Lainow
Copy link
Contributor

@Lainow Lainow commented Aug 18, 2025

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 !38855
  • Here is a brief description of what this PR does

Correcting the SQL error: The column ‘...’ cannot be null in the query.

Screenshots (if appropriate):

image

@Lainow Lainow self-assigned this Aug 18, 2025
@Lainow Lainow requested review from Rom1-B and stonebuzz August 18, 2025 15:10
Co-authored-by: Stanislas <skita@teclib.com>
Lainow and others added 2 commits August 19, 2025 09:46
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
@Lainow Lainow requested review from Rom1-B and stonebuzz August 19, 2025 07:57
Copy link
Contributor

@stonebuzz stonebuzz left a comment

Choose a reason for hiding this comment

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

If CPU is the only case encountered (on NetworkEquipment), it is recommended to implement the public function reformat(&$values = []) method in the PluginDatainjectionNetworkEquipmentInjection class, similar to the implementation in PluginDatainjectionInfocomInjection:

public function reformat(&$values = [])
{
    foreach (
        ['order_date', 'use_date', 'buy_date', 'warranty_date', 'delivery_date', 'inventory_date'] 
        as $date
    ) {
        if (
            isset($values['Infocom'][$date]) &&
            ($values['Infocom'][$date] == PluginDatainjectionCommonInjectionLib::EMPTY_VALUE)
        ) {
            $values['Infocom'][$date] = "NULL";
        }
    }
}

@Lainow Lainow requested a review from stonebuzz August 22, 2025 08:27
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
@stonebuzz stonebuzz requested a review from Rom1-B August 22, 2025 08:54
@Rom1-B Rom1-B merged commit fdd90d1 into pluginsGLPI:main Aug 22, 2025
3 checks passed
@cconard96 cconard96 mentioned this pull request Aug 29, 2025
2 tasks
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