Change the y to i when adding a suffix (syllable at the end of a word) if the word ends in a consonant plus y. party becomes parties.
BUT not if you are adding ish, ing or ist. (You never use ii in English except when skiing.)
If the base word ends in a vowel plus y keep the y: donkey donkeys
To sum up: change the y to i unless there is a vowel before it or an i after it.