Recalculate history when the power of a model or the category of a type changes

Ouverte
#397 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
56/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
php
Domaine
backend

Piste de recherche

Issue #213 already handles recalculation when lifespan changes; read that implementation first to find the relevant entry points. Then trace how model power changes affect existing usage rows and how type category changes affect embodied impacts. Done means both changes trigger recalculation for existing history, without manual data updates.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Changing the power of a computer model or type does not affect the days already calculated: only new days use the new value. Changing the category of a computer type does not mark the embodied impacts for recalculation either.
We replaced the power of several server models (it was the PSU rating) with measured values. We had to rescale the existing usage rows ourselves and set recalculate = 1 by hand on the embodied impacts.
#213 already does this when the lifespan changes. Doing the same for power and category would keep the history consistent with the current settings.

Laurent Tison, Afnic

Langage dominant
PHP
Étoiles
5
Forks
7
Merge moyen
2 h 26 min
PR mergées (30 j)
1

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de pluginsGLPI/carbon

Toutes les issues de pluginsGLPI/carbon

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.