Skip to content

Fix: handle tickets without creation date on update - #406

Merged
Rom1-B merged 1 commit into
11.0/bugfixesfrom
issue_395
Nov 17, 2026
Merged

Rom1-B merged 1 commit into
11.0/bugfixesfrom
issue_395

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

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 Error DatetimeException when transfering item from an entity to another one #395
  • Updating a ticket that has no creation date (legacy or migrated data) raised an exception in the tag plugin, aborting operations such as transferring assets and their linked tickets to another entity.
  • Such tickets are now handled like any existing ticket, so the update completes normally.
  • Also restores a missing closing brace in TagItemTest.php that prevented the test file from loading.
glpi.ERROR:   *** Caught Safe\Exceptions\DatetimeException: An error occurred
  Backtrace :
  ...fe/generated/Exceptions/DatetimeException.php:9
  ...dingmachine/safe/generated/8.2/datetime.php:337 Safe\Exceptions\DatetimeException::createFromPhpError()
  ./marketplace/tag/inc/tagitem.class.php:478        Safe\strtotime()
  ./src/Plugin.php:1810                              PluginTagTagItem::updateItem()
  ./src/CommonDBTM.php:1685                          Plugin::doHook()
  ./src/Transfer.php:3227                            CommonDBTM->update()
  ./src/Transfer.php:1217                            Transfer->transferTickets()

Screenshots (if appropriate):

@Rom1-B Rom1-B linked an issue Nov 16, 2026 that may be closed by this pull request
2 tasks done
@Rom1-B
Rom1-B requested review from a team, Herafia, RomainLvr and jdurand-teclib and removed request for a team November 16, 2026 14:36
@Rom1-B
Rom1-B merged commit 7e9b4c2 into 11.0/bugfixes Nov 17, 2026
7 checks passed
@Rom1-B
Rom1-B deleted the issue_395 branch November 17, 2026 09:25
@glpi-project

glpi-project Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Backport-action backported this pull request in workflow run 44055473562.

Target Status
main ⚠️ Drafted with conflicts #407

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.

Error DatetimeException when transfering item from an entity to another one

2 participants