Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using shift functions on graphs, negative values are not allowed #3874

Closed
DebugBill opened this issue Oct 20, 2020 · 2 comments
Closed
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@DebugBill
Copy link

When using the "shift data" option for a graph item, negative values if entered are ignored. Still they are valid in RDDTOOL and work fine.

In order to fix this bug I only replaced in 4 places in lib/rrd.php
if ($graph_item['shift'] == CHECKED && $graph_item['value'] > 0)
with
if ($graph_item['shift'] == CHECKED && abs($graph_item['value']) > 0)

Fixed file is attached, renamed to rrd.php.txt

rrd.php.txt

@DebugBill DebugBill added bug Undesired behaviour unverified Some days we don't have a clue labels Oct 20, 2020
@TheWitness
Copy link
Member

How about a pull request off the 1.2.x branch?

@DebugBill
Copy link
Author

Well, I am not a developper nor a regular contributor so I thought it would be easier that way.... The fixed file is attached to this report. I'm happy to have anybody cot/paste it to its own directory and claim the job is his own. :-)

TheWitness added a commit that referenced this issue Oct 21, 2020
The SHIFT functionnality in graphs does not accept negative values
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels Oct 21, 2020
@TheWitness TheWitness added this to the 1.2.15 milestone Oct 21, 2020
@netniV netniV changed the title The SHIFT functionnality in graphs does not accept negative values When using shift functions on graphs, negative values are not allowed Nov 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants