As far as I know there is no rule for 'y' changing to 'i' unless you are adding 'es'.
For example: shy becomes shyness (if you are adding 'ness' as the suffix) just the same as dry becomes dryness. Think of another suffix 'ing'. The same thing happens there. Dry becomes drying (not driing) and cry becomes crying. However if you want to add 'es' then you have a different result. Dry becomes dries and cry becomes cries. If there is a rule for 'y' changing to 'i' when it precedes a suffix, I've never heard of it. However, English is a language made up of many other languages and incorporates many rules and many more exceptions that don't really make sense if you apply them across the board.