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
Prevent recalculation algorithm if no yeild is given #1986
Comments
I'd like to fix this |
I will assign you happily! |
If you need help, feel free to contact us here, in the discussions or the matrix chat. |
Thanks, I ll work on it in sometime. :) |
Hi Christian, |
Hello @mohmaaya. There is the documentation page at https://nextcloud.github.io/cookbook/dev/contributing/setup that suggests mainly Julius' development setup. Did you find that and follow its process? |
I do not know what caused the NaN in your case and therefor whether the fix from @j0hannesr0th will fix my newbie issue too ? I have found that I got NaN for all ingredients until I entered the number of portions into the servings entry field. Cheers for this fine piece of software! I only had some minor difficulties as it is not yet readily available from the nextcloud app store and the documentation for administrators is still missing:
|
@mohmaaya may I ask you if you had any success so far? It it progressing? |
@christianlupus I am so sorry but I got very busy that I completely forgot about this task. I can work on this in the next couple of days since I have time. Can you please let me know if the bug is fixed with johannes PR as I see above merge. If so, then I can take another task. |
No problem. I just wanted to make sure we are not waiting on each other for some reason. The issue is not solved yet. The provided PR was addressing some other issue. The actual problem in this issue is the division by zero in case the recipe yield cannot be parsed successfully. This is still the case. |
Is there a way to disable this "recalculation"? Most of my recipes now display recalc errors or NaN. I cannot find any other reference to this "feature." |
I have about 200 recipes and not a single one has any issue. Can you share a recipe link that we can check if there is a bug? @MikeSpaceG |
I think you can create a recipe simply. Just create a new recipe, give it a random name and put some ingredients with a number (so that the calculation is triggered). Make sure to not set the yield field (or set it to null). You will most probably see the NaNs due to x/0 calculation. I have not tested right now the steps as I am on mobile but I tried it multiple times. |
Here is a short video on the issue: test.mp4 |
Will fix it today evening. I don't have a recipe without servings, so never noticed it. |
@mohmaaya wanted to work on this issue, @j0hannesr0th. Please sync to avoid unnecessary doubled work and frustration on either side. Thanks. |
The recalucaltion algorithm of the ingredients fails if the recipe yield is non-numeric or null. This will result in NaN entries while recipe viewing. This should be fixed.
The text was updated successfully, but these errors were encountered: