Rinse the sauerkraut under the running water. Squeeze excess water and chop it.
Place sauerkraut in a pot with water. Water should come to a level where contents are submerged.
Add bay leaves and allspice.
Cook on low heat for about 40-60 minutes until the sauerkraut is soft.
If water evaporates, you may need to add hot boiling water a few times during the process.
In the meantime, place dried mushrooms in a pot with water. Let them stand for half an hour.
Cook the mushrooms in the same water they were soaking in for another half an hour, adding a little bit of salt.
In a frying pan, heat up the olive oil. Add onions and cook for approximately 5 minutes until they are golden brown.
When the mushrooms are cooked, remove them with the slotted spoon and add to the sauerkraut.
Using a cheesecloth (or thin strainer) and ladle, pour one ladle of the mushroom water at the time over the sauerkraut (you may want to add 1-3 ladles to the sauerkraut depending on how much liquid has evaporated)
Cook for about 10 more minutes to reduce some of the liquid (the dish should be wet but not soaking in water).
Add onions and sugar to the pot and stir to combine.
Discard bay leaves.
Add salt and pepper for taste.
Optionally you can add a tablespoon or 2 of butter and mix it well.
Garnish with parsley and serve as a side dish.