Pull the names of Priority field values instead of hardcoding them.
Closes T15799
Differential D25602
Do not hardcode default Priority names in Project Reports tooltip aklapper on Apr 26 2024, 10:33. Authored by Tags None Referenced Files
Subscribers
Details
Pull the names of Priority field values instead of hardcoding them. Closes T15799
Diff Detail
Event TimelineComment Actions Thanks! Please evaluate extended names: $low_priorities = array(); $priorities = ManiphestTaskPriority::getTaskPriorityMap(); ... $priority_v => $priority_label Also please evaluate the creation of: private function getNormalPriority() { // TODO: This is sort of a hard-code for the default "normal" status. // When reports are more powerful, this should be made more general. return 50; } So we can adopt that, removing both current TODOs. If you like that, let's micro-optimize, doing this before loops: $normal_priority = $this->getNormalPriority();
Comment Actions Improvicate some things that valerio mentioned. (I prefer "Average" to "Normal" though; I consider "normal" a problematic term in this context.)
|