Inventory Sort Order

Discussion in 'Recipe Editor' started by AHarper, Oct 27, 2020.

  1. AHarper

    AHarper Well-Known Member

    Joined:
    Mar 23, 2018
    Messages:
    401
    Likes Received:
    357
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Retired
    Location:
    Sussex, UK
    Sorry but I have found another problem with the Inventory system - specifically in the Fermentables section - but I do know what the problem is.

    I have been updating some of the items in my inventory - and adding a new Fermentable (for me) and have followed all the settings - as I have in the past - and all seems to work... except... Fermentable names now have a Leading Space character added for some reason and this now screws up the Sort Order. My newly modified entries, and the new one, all appear at the head of the list - in their true alphabetically sorted of course but they are then followed by the rest of the original entries - again in sort order. This problem has reared it's ugly head in the last couple of days so may be easily traced.
    Examples:
    Order sorted by Location - this works as expected.
    upload_2020-10-27_13-52-49.png

    Order sorted by Name A-Z - The first three entries are NOT in their correct position due to the leading SPACE character being selected first.
    upload_2020-10-27_13-54-30.png
     
  2. Yooper

    Yooper Administrator
    Staff Member

    Joined:
    Nov 16, 2013
    Messages:
    2,486
    Likes Received:
    1,566
    Trophy Points:
    113
    Gender:
    Female
    Occupation:
    Happily retired
    Location:
    Upper Michigan/Florida
    I'm looking at this now!
     
  3. Yooper

    Yooper Administrator
    Staff Member

    Joined:
    Nov 16, 2013
    Messages:
    2,486
    Likes Received:
    1,566
    Trophy Points:
    113
    Gender:
    Female
    Occupation:
    Happily retired
    Location:
    Upper Michigan/Florida
    This is weird- but I can NOT recreate this in your account. I typed in Yooper's Test- and it worked as expected.
     
  4. AHarper

    AHarper Well-Known Member

    Joined:
    Mar 23, 2018
    Messages:
    401
    Likes Received:
    357
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Retired
    Location:
    Sussex, UK
    OK I just saw your entry and it, correctly, drops to the bottom of the list.
    I'll try re-editing the entries - and check for any leading space character being added by the system - for that is what screws up the sort order. The other values all appear correctly so what is happening I do not know. I'll come back after tests. If you want to delete this thread - if it doesn't affect any one else then that is ok.
     
  5. AHarper

    AHarper Well-Known Member

    Joined:
    Mar 23, 2018
    Messages:
    401
    Likes Received:
    357
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Retired
    Location:
    Sussex, UK
    Another Security error here while posting
     
  6. AHarper

    AHarper Well-Known Member

    Joined:
    Mar 23, 2018
    Messages:
    401
    Likes Received:
    357
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Retired
    Location:
    Sussex, UK
    OK I see what is happening.
    1. Add a new Fermentable to your inventory and pick one from the drop down list that has a national flag against it.
    I shall pick AMERICAN ALE MALT. This has a flag against it and as the name starts with A it should float to the top of my ingredients list - but should show AFTER the Amber Malt already in there. I do not change any other fields at this point - I can always edit later.

    Pic 1

    2. After saving the new ingredient floats to the top of the list - it should be after Amber Malt - as I have Sort order of Name A-Z selected.

    pic 2

    3. OK Change the sort order to something else - In this case I selected Location - and the the new entry stays where it is (as the Location field is BLANK so it should stay there - the other ingredients have a value in that field)

    pic 3

    4) Change the Sort order back to Name A-Z and now Edit the record.

    pic4

    5) This time EDIT the Name field and Type in the name in full - instead of selecting the drop down value - and then select the Add American Ale Malt option at the top of the drop down list - this accepts what you have just typed in as the value for the field.

    pic 5 pic 6

    6) Save the edited data and return to the Inventory list.

    et. Voila!!! the entry is NOW in the correct sort order position.

    This only seems to happen with an entry that has a Flag against it. If you were to select a Name for an ingredient from the drop down list at the initial stage that doesn't have a flag all is well.

    pic 7
     
  7. AHarper

    AHarper Well-Known Member

    Joined:
    Mar 23, 2018
    Messages:
    401
    Likes Received:
    357
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Retired
    Location:
    Sussex, UK
    For above/// must be data size issues in original post
    Pic 1
    upload_2020-10-28_15-54-6.png
    pic 2
    upload_2020-10-28_15-51-39.png

    Pic 3
    upload_2020-10-28_15-52-4.png

    pic 4
    upload_2020-10-28_15-52-35.png

    pic 5
    upload_2020-10-28_15-52-57.png
    pic 6
    upload_2020-10-28_15-55-16.png
    Pic 7
    upload_2020-10-28_15-55-40.png
     
  8. Yooper

    Yooper Administrator
    Staff Member

    Joined:
    Nov 16, 2013
    Messages:
    2,486
    Likes Received:
    1,566
    Trophy Points:
    113
    Gender:
    Female
    Occupation:
    Happily retired
    Location:
    Upper Michigan/Florida
    Pricelessbrewing likes this.
  9. AHarper

    AHarper Well-Known Member

    Joined:
    Mar 23, 2018
    Messages:
    401
    Likes Received:
    357
    Trophy Points:
    63
    Gender:
    Male
    Occupation:
    Retired
    Location:
    Sussex, UK
    I think I get that Web error as it take a long time to build the post that the system times out on me... I can't recover the post so have to start again using a copy of the original text... hence that garbles two part report... sorry about that.
     
  10. Pricelessbrewing

    Pricelessbrewing QA Software Tester
    Staff Member

    Joined:
    Jun 8, 2016
    Messages:
    764
    Likes Received:
    502
    Trophy Points:
    93
    Gender:
    Male
    Okay I think I got it.

    I'll have to confirm after I catch up, but I think it's sorting "custom" ingredients separate from default BF ingredients?

    First "American Ale Malt" is a BF ingredient so it gets sorted properly at the top.

    Then when you click "add American Ale Malt" it's creating a custom ingredient with that as it's name, and is being sorted at the top of the custom ingredients.

    The same thing happens in the recipe builder, if you have 2 grains and add a custom grain, the custom grain is always at the bottom.
     

Share This Page

arrow_white