Dagger was filmed before Grace left the series. No doubt the character was changed because having Rand in that role as written would complicate the relationship. As much as Rand was conceived as an unrequited love interest, this would have been pushing it.
From Memory Alpha [
link]:
Intended to appear in far more episodes than she ultimately did, Whitney's Yeoman Rand was written out of several episodes, and ultimately dropped from the series after eight episodes. Her last on-screen appearance in the original Star Trek series is at the end of the episode "The Conscience of the King" when she exits the turbolift and gives a cold stare to Lenore Karidian. The following episode, her character is replaced by Dr. Helen Noel in "Dagger of the Mind".
Perhaps this passage is in error. Whatever the exact sequence, Whitney was about to be axed. But I'll just strike the remark, because the reason why the character was changed isn't important to the points in that post.
Memory Alpha also says [
link]:
The part of Helen Noel was originally written for Grace Lee Whitney's character Janice Rand; however, producers wanted to avoid showing Kirk becoming involved with her, and Whitney was already on the verge of leaving the show due to personal problems on the set. (The Star Trek Compendium, 4th ed., p.41)
Personally, I'd think this has to be taken in context with the premise that (again, whatever the exact sequence) Rand's departure was all but imminent and certain. I'd think, if a character is about to get written out of the show, one wouldn't want to invest screen time developing her more than necessary. Any hesitancy producers might have had regarding Kirk getting involved with any of his female crew didn't stop the show from having Kirk and Helen become involved to the degree that they did, with Kirk under the influence of the neural neutralizer and Helen having concocted a fantasy of the Christmas party. And it didn't stop Rand from admitting that she'd wanted Kirk to notice her legs in "Miri".
I've asked Fact Trek if they have any information regarding this [
link]. Perhaps they can set the record straight!