Every calculated day adds a line in the asset history
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
Research direction
The issue names CarbonEmission and AbstractImpact and reports that both inherit CommonDBChild without overriding $logs_for_parent. Read those class definitions and check how the parent class handles this property. Done means calculated rows no longer add entries to the asset history while calculations continue unchanged.
Written by the indexing model from the issue text.
Description
GLPI version: 11.0.11
Plugin version: 1.3.1 (same code in 1.4.0)
Bug description
CarbonEmission and AbstractImpact extend CommonDBChild without overriding $logs_for_parent. Each row they create writes "Add an item" in the history of the asset: one line per calculated day and per asset, plus one per embodied impact.
After a few months an asset has hundreds of these lines, and a catch-up run writes thousands at once. We had 1.17 million of them. They bury the real changes, and the history is what we read to know who changed what on an asset.
Relevant log output
94342612 08-11-2026 08:58 cron_UsageImpact Emission de carbone Ajout d'un élément : Emission de carbone (N/A (1061053))
93102748 07-11-2026 08:58 cron_UsageImpact Emission de carbone Ajout d'un élément : Emission de carbone (N/A (1060639))
Anything else?
We applied public static $logs_for_parent = false; on both classes locally. Calculations are unchanged and the history stays readable.
Laurent Tison, Afnic
- Dominant language
- PHP
- Stars
- 5
- Forks
- 7
- Avg merge
- 2h 26m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pluginsGLPI/carbon
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
pluginsGLPI/carbon#239 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
pluginsGLPI/carbon#397 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
pluginsGLPI/carbon#395 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
pluginsGLPI/carbon#392 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
pluginsGLPI/carbon#391 ·
All issues in pluginsGLPI/carbon
Similar issues
-
[BUG] Bundle products lose their price in RSS feeds: getPrices() was removedPossibly taken @pcvelz claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
OpenMage/magento-lts#5869 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
modelcontextprotocol/php-sdk#746 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
OpenGIS/waymark-wp#82 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
claude
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
sprain/sprainocchio#39 ·
Maintainers usually reply within 1 day