They handled it as well as they could. She dropped the 'leaving' bomb two weeks before they were scheduled to start shooting. Didn't give the writers much time.
The character will be missed. Aside from malaprops on the level of early Temperance Brennan, Ziva fit into the NCIS chemistry much better than her predecessor. Replacing her will be tough. I still wonder why De Pablo bolted. It's a top ten show [if not #1] and shows no sign of age.