Skip to content

GLPI 11 - PluginRH Available notification tags popup fails with "Call to a member function getTags() on false" #148

@Samirsncf

Description

@Samirsncf

Hello,

First of all, thank you for your work on the Resources plugin.

We encountered an issue after migrating from GLPI 10 to GLPI 11 with the latest Resources plugin version.

When opening the "Available tags" popup inside notification templates related to Resources, the popup crashes with the following error:

Image
Call to a member function getTags() on false

/src/NotificationTemplateTranslation.php:333
/front/notification.tags.php:44

Our notification templates were still using the old itemtype:

PluginResourcesResource

However, this class no longer exists in the plugin source code on GLPI 11.

We found that the new class structure now uses:

GlpiPlugin\Resources\Resource

## Temporary workaround / fix

We resolved the issue by updating the notification templates directly in the database:

UPDATE glpi_notificationtemplates
SET itemtype = 'GlpiPlugin\\Resources\\Resource'
WHERE itemtype = 'PluginResourcesResource';

After clearing the GLPI cache, the available tags popup started working again.

Would it be possible to include this migration/update automatically in a future plugin release to avoid manual database modifications after GLPI 11 migrations?

## Additional feature request

Would it also be possible to add notification tags for:

  • User service
  • User job position / role (poste)

(we mean the employee job title/function, not the workstation/computer)

A lot of our users and HR teams are requesting these fields in email notifications.

Example use cases:

  • onboarding notifications
  • departure notifications
  • HR validation workflows

Also, we noticed that this issue may be related to:
#145

Would it also be possible to include all related fixes and modifications from this issue in a future release/update of the plugin?

Thank you again for your work and support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions