Skip to content

Fractures are displayed with "1 0/1" instead of "1" when increasing servings #2745

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

Open
Florian2406 opened this issue Apr 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Florian2406
Copy link

Description
When the ingredients contain fractures, such as "1/2" and increasing the servings from e.g. 2 to 4 it will add up to 1 but displays "1 0/1". This works for all whole fractures, so 1 0/1, 2 0/1, 3 0/1 and so on

Reproduction
Steps to reproduce the behavior:

  1. Create a recipe with an ingredient with amount "1/2" e.g. "1/2 onion" and set the servings to 2
  2. Save the recipe
  3. Open the recipe and increase the servings to 4
  4. See the ingredients

Expected behavior
Ingredients say "1 onion"

Actual behavior
Ingredients say "1 0/1 onion"

Screenshots
1/2 (2 servings)
Image
1 (4 servings)
Image

Browser
Mozilla Firefox for Fedora v137.0 (64 bit)

Versions
Nextcloud server version: 31.0.2
Cookbook version: 0.11.3
Database system: MariaDB

@Florian2406 Florian2406 added the bug Something isn't working label Apr 19, 2025
@Florian2406
Copy link
Author

Small addition: it works fine in the cookbook android app (v0.24.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant