Iowa Representative Derek Wulf (R-Hudson) has introduced HF 353. It bars candidates from primaries if they have been members of another party during the preceding year. Here is the text. It also bars voters from voting in primaries if they have been members of another party during the preceding thirty days, and it attempts to extend this rule to party caucuses.
In 1986 the U.S. Supreme Court decision Tashjian v Republican Party of Connecticut said that if parties wish to nominate a non-member, the First Amendment freedom of association clause protects their ability to do that. Courts in Colorado and New Mexico have struck down duration of party membership laws, in situations in which the party didn’t want the restriction.