Bug 278421 - krecipes does not always autofill ingredients - units
Summary: krecipes does not always autofill ingredients - units
Status: CONFIRMED
Alias: None
Product: krecipes
Classification: Applications
Component: general (show other bugs)
Version: 2.0-beta2
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-24 21:24 UTC by Dennis Mills
Modified: 2015-02-21 16:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Mills 2011-07-24 21:24:56 UTC
Version:           2.0-beta2 (using KDE 4.4.5) 
OS:                Linux

Something I've noticed when using krecipes: I'll be typing in a new recipe, and when entering ingredients, the units field sometimes doesn't autofill. Within the same recipe I can enter a c in the units field and the 'up' will be grayed out, meaning I can either tab to preparation or enter to complete the ingredient and krecipes will list the units as cups - great! Other times I enter a c and get nothing, so I have to type the entire unit. This is more of a hassle when I have teaspoons or tablespoons to enter.

Anyone know why this happens?

Reproducible: Didn't try

Steps to Reproduce:
The problem is random in nature so there is no set steps to make it occur.


Actual Results:  
I am currently entering a new recipe. The second ingredient is 3 tablespoons of milk. I enter the t in the units field and nothing happened, so I completed the spelling. The third ingredient is 1 tablespoon of lemon juice. I enter t in the units field and tablespoon, greyed out, pops up. The fifth ingredient is 2 tablespoons of chopped green onions. I enter a t in the units field and nothing happens.

Expected Results:  
Either tablespoon or teaspoon should show up, greyed out.

OS: Linux (x86_64) release 2.6.32-33-generic
Compiler: cc
Comment 1 groot 2015-02-21 16:20:01 UTC
This is probably related to the association between ingredients and units. If a unit is used with an ingredient, then that unit is available in the drop-down. In the default database, most ingredients do not have any default units (like you might expect milk to have ml, tbsp and cups associated). If you use tbsp with milk just once in a recipe, then from then on tbsp will be available.

Seems like something to prime the database with, really -- if we can find a reasonable list of expected units for the default ingredients.