Because a crack formed in the side wall of their new motor home, Robert and Kathleen Knowles sued Fleetwood Motorhomes of California, Inc. But, because the Knowles had previously sued Fleetwood about that motor home, the district court by summary judgment swept away the Knowles’ lawsuit by broadly ruling the doctrine of res judicata barred their warranty and consumer claims. This doctrine is sometimes called claim preclusion, a precept based on the need for final judgments, especially after a party has had an opportunity to litigate a matter in a prior action in a court of competent jurisdiction. We hold the doctrine of claim preclusion does not apply in this case because Fleetwood’s actions in the prior lawsuit, preventing litigation of these claims arising from the crack in the side wall, amount to a waiver of the defense of res judicata. We reverse and remand for trial.
*574We discuss the details of the first lawsuit.
On January 17, 2003, Robert and Kathleen Knowles bought a 2003 Fleetwood “Bounder” motor home for $88,363.63. The Knowles experienced many problems with their Bounder; the most serious problem was a persistent leak in the bedroom slide-out area. The manufacturer s warranty for the Bounder expired on July 17, 2004, and its structural warranty expired on January 17, 2006.
Because these problems had not been repaired to their satisfaction under the warranty, the Knowles filed a lawsuit in May 2004 against Fleetwood. They made a claim of breach of warranty and a claim for deceptive acts and practices under the Kansas Consumer Protection Act, K.S.A. 50-623 et. seq.
The side-wall crack appeared after the Knowles filed their first lawsuit.
In July or August 2004, the Knowles noticed that a crack had developed in the Bounder s side wall. Knowledge of this problem came up first in the Knowles’ September 2004 depositions. Robert Knowles thought tire crack “looked like a stress crack” from the leak’s water damages. But, the Knowles did not seek to amend their petition to include the cost of repairs for the crack. Instead, the Knowles raised this issue during settlement negotiations, in the pretrial order, and at the jury trial.
• Settlement Talks
During settlement negotiations, the parties reached a tentative agreement about the side-wall crack in November 2004. Fleetwood agreed to transport the Bounder to its Indiana plant for repairs, while the parties continued to negotiate the Knowles’ other requests, such as attorney fees. Fleetwood later said it could not bring back the Bounder until January 2005. The Knowles agreed to the new date.
In January 2005, however, Fleetwood changed its position and did not bring back the Bounder. Instead, Fleetwood flew its dispute resolution coordinator to the Bounder’s location for inspection. Fleetwood decided the crack could be repaired by any body shop that does fiberglass repairs. This was unacceptable to the *575Knowles because their expert had thought the proper repairs required replacement of the entire side wall, not just a patch on the outside.
• Pretrial Order
The Knowles made this claim in the pretrial order:
“The leak into the plaintiffs Bounder caused the wood paneling, which is part of the side wall of the Bounder, to deteriorate, thereby decreasing the strength of the side •wall.'This resulted in a crack developing in the exterior side wall of the Bounder at the front comer of the bedroom slide-out.” (Emphasis added.)
In response, Fleetwood filed a motion in limine asking the district court to exclude evidence about the side-wall crack. Fleet-wood argued tire Knowles failed to assert properly the damages claim for the crack because they had made no request to Fleetwood for repairs of the crack under their warranty:
“For purposes here today, Your Honor, we’re entitled under all the warranty laws, we’re entitled to have the opportunity to repair or fix anything they contend is a workmanship defect or something to that nature. And none of this was ever presented to the dealer or to Fleetwood for any purposeful repair or replacement in any way.
“So this particular item, which is one of some other items, is nothing that was ever presented to us, nothing that we’ve ever been given an opportunity to repair and correct, if it was in fact something that we did or caused. I don’t see how it gets to part of the lawsuit that they’re complaining that we failed to meet some warranty requirement or we failed, we did something deceptively or performed some unconscionable act, if you will, when we’ve never had any opportunity to work on it.”
The court ruled it would allow evidence of the crack but only because of water infiltration.
• Jury Trial
Later, at the jury trial, the court elaborated on its ruling on the motion in limine.
“Fixing the crack is irrelevant because you never asked for it to be fixed in the past.” (Emphasis added.)
Because of this ruling, the Knowles did not further question their expert about die crack or the costs to repair the crack. During *576cross-examination, however, Fleetwood challenged the expert’s value assessment of the Bounder, which led to further discussion of the district court’s ruling.
“[Fleetwood:] Isn’t it true that you are considering some repair issue concerning the crack to get that twenty to $25,000 number. Is that a fact?
“[Knowles’ expert:] Yes. That would be.
“[Fleetwood:] So, I would move to strike his previous answer, Your Honor, on the basis of the Court’s previous rulings about the issue of the crack because he has contemplated that and considered that in his testimony.”
The district court sustained Fleetwood’s objection.
In this lawsuit, the parties agreed in the claims of uncontroverted facts that the district court’s ruling was:
“14. The judge in the previous litigation ruled in a motion in limine that the plaintiffs could not discuss the existence of the crack at trial because they had never presented the crack to Fleetwood to be repaired. The judge did rule that the plaintiffs could mention the crack as an element of damages but could not ask for damages for the crack itself.” (Emphasis added.)
We find this ruling contradictory and confusing.
After the district court excluded the cost to repair the side-wall crack, the Knowles’ expert assessed the value of the Bounder with the remaining problems at $68,000, rather than his prior assessment of $60,000. Based on this evidence, the juiy returned a verdict in favor for the Knowles only for their breach of warranty claim. For that claim, the jury awarded damages of $20,363.63. The Knowles did not appeal this decision.
We turn to the second lawsuit.
Fleetwood’s warranty on the motor home states that “[wjritten notice of defects must be given to the selling dealer or manufacturer not later than ten (10) days after the expiration of the warranty period.” Within that 10 days (the warranty expired on January 17, 2006) on January 23, 2006, the Knowles made a written request to Fleetwood to repair the crack in the side-wall under the Bounder’s 3-year structural warranty. Fleetwood denied their request on May 10, 2006. This lawsuit followed. Fleetwood filed for summary judgment, which the court granted based on res judicata.
*577In this appeal, the Knowles contend res judicata does not bar their breach of warranty claim for three reasons. First, they agree their claim did not exist when they filed their first lawsuit against Fleetwood. Second, they contend Fleetwood waived the defense of res judicata by arguing this claim should be excluded in the prior action. Finally, it is the Knowles’ belief that this is a separate claim distinct from their prior breach of warranty claim.
On their Kansas Consumer Protection Act claim, the Knowles make two similar arguments. First, the side-wall crack was not in existence when the first claim was made, so res judicata cannot apply; and second, this is a separate and distinct claim from the first, and res judicata cannot bar its presentation.
We give our standard of review and set out some principles of law on res judicata.
Where there is no factual dispute, appellate review of an order granting summary judgment is de novo. Cooke v. Gillespie, 285 Kan. 748, 754, 176 P.3d 144 (2008). Also, whether res judicata applies is a question of law; thus, this court’s review over this issue is also de novo. O’Keefe v. Merrill Lynch & Co., 32 Kan. App. 2d 474, 479, 84 P.3d 613, rev. denied 278 Kan. 846 (2004).
“Res judicata encompasses both issue preclusion and claim preclusion. Issue preclusion (collateral estoppel) precludes relitigation of issues previously determined. Claim preclusion precludes relitigation of a claim that has been finally adjudicated in a court of competent jurisdiction. [Citation omitted.]” In re Marriage of Ormsbee, 39 Kan. App. 2d 715, 718, 186 P.3d 806 (2008).
Here, the district court does not distinguish between issue and claim preclusion in its res judicata ruling. But it is clear from the facts the district court intended claim preclusion to apply. See Migra v. Warren City School Dist. Bd. of Ed., 465 U.S. 75, 77 n.1, 79 L. Ed. 2d 56, 104 S. Ct. 892 (1984) (explaining that the preclusive effects of former adjudication are collectively referred to as the doctrine of res judicata, but when the term res judicata is used in a narrow sense, it has become almost synonymous with “claim preclusion”).
*578Claim preclusion is based on the need for finality in judgments. “It is founded on the principle that the party, or some other party in privity, has litigated or had an opportunity to litigate the same matter in a former action in a court of competent jurisdiction. [Citations omitted.]” (Emphasis added.) Jackson Trak Group, Inc. v. Mid States Port Authority, 242 Kan. 683, 690, 751 P.2d 122 (1988).
Claim preclusion exists when there are four identities. First, there must be identity in the things sued for. Second, there must be an identity of the cause of action. Third, the case must have an identity of persons and parties to the action. And, fourth, there must be an identity in the quality of the persons for or against whom the claim is made. 242 Kan. at 690.
There is no doubt the Knowles raised the claim about the crack in the first lawsuit.
Besides the express provision in the pretrial order, the Knowles further asserted the crack was the result of the original defect when they contended: “There was a leak, the leak caused this crack, they could not fix the leak. That was the problem.”
Under K.S.A. 60-216(e), the pretrial order controls the following course of the action unless the order is changed by agreement of the parties or by the court to prevent obvious injustice. Our Supreme Court has held the pretrial order supersedes the pleadings and effectively amends the pleadings to conform to it. See Bob Eldridge Constr. Co. v. Pioneer Materials, Inc., 235 Kan. 599, Syl. ¶ 8, 684 P.2d 355 (1984).
Here, it is evident the pretrial order in the first lawsuit contained, among others, the same claims as those raised in the second lawsuit. Therefore, because these claims were raised in the first lawsuit, they are now subject to claim preclusion.
Two cases guide us in resolving this matter.
Because Fleetwood undertook actions which prevented the Knowles from presenting evidence of damages about the crack in the first lawsuit, we hold Fleetwood is not in a position to invoke the defense of claim preclusion in the second lawsuit. Two cases, one federal and one old Kansas case lead us to this conclusion.
*579The federal case is Craig v. County of Maui, 157 F. Supp. 2d 1137 (D. Hawaii 2001). In Craig, the plaintiff filed a lawsuit in state court asserting employment discrimination and retaliation because of his disability. The state court issued summary judgment in favor of the defendants. Following that ruling, the plaintiff filed a second lawsuit in federal court challenging his termination from his employment. In the second lawsuit, the defendants moved for summary judgment on grounds of res judicata, specifically claim preclusion, alleging that plaintiff s claim should have been brought in the first lawsuit and, thus, the plaintiffs failure to amend that complaint to include this claim barred him from filing a second lawsuit.
The United States District Court of Hawaii disagreed with the defendants. Under federal law, claim preclusion consists of three requirements: “(1) the present claim could have been or was asserted in an earlier action; (2) the parties are the same as, of are in the privity to, the parties in the earlier action; and (3) final judgment was entered in the first action.” 157 F. Supp. 2d at 1140-41; see Stanfield v. Osborne Industries, Inc., 263 Kan. 388, 396, 949 P.2d 602 (1997), cert. denied 525 U.S. 831 (1998) (recognizing that Kansas law does not differ significantly from federal law on the preclusion doctrines); see also MACTEC, Inc. v. Gorelick, 427 F.3d 821, 831 (10th Cir. 2005), cert. denied 547 U.S. 1040 (2006) (“If requirements are met, res judicata is appropriate unless the party seeking to avoid preclusion did not have a full and fair opportunity’ to litigate the claim in the prior suit.” [Emphasis added.]). In addition, under Hawaii state law, “the defense of res judicata is deemed to have been waived by the defendant where the first suit did not include the subject matter of the second at the insistence of the defendant. [Citation omitted.]” 157 F. Supp. 2d at 1141.
The court in Craig reviewed the facts that showed the plaintiff tried to bring his termination claim into the first lawsuit by filing a motion for continuance for that purpose. But,:,the defendants objected to the plaintiffs motion, arguing the termination claim was not related enough to the claim pending before the state court. The state court then agreed with the defendants. ‘
*580From the facts, the court in Craig decided the defendants’ actions precluded the plaintiff from amending his complaint to include his employment termination claim. Therefore, the court concluded that the defendants had waived their defense of res judicata in tire second lawsuit, reasoning: “It would be, after all, inequitable to preclude Plaintiff from ever bringing this claim to resolution in court when he attempted to do so and was disallowed.” 157 F. Supp. 2d at 1142.
The Kansas case is Harnish v. Barzen, 103 Kan. 61, Syl. ¶ 2, 173 Pac. 4 (1918). In Harnish, the Kansas Supreme Court yeax-s earlier applied the same reasoning later used in Craig. In Harnish, Theodor Peltzer fraudulently traded an apartment house for the plaintiffs farm. Peltzer then sold forged real estate securities to the defendant. The defendant challenged Peltzer’s actions, and Peltzer admitted his guilt. Because of his guilt, Peltzer deeded to the defendant several farms, which included the plaintiff s farm, and then later committed suicide.
In a federal action, the United States District Court for the Western District of Missouri then declared the defendant to be the absolute owner in fee simple of the plaintiff s farm. Because the plaintiff was not a party in that suit, after the decree was entered, the plaintiff moved the decree be eliminated. In response, the defendant moved the plaintiff s motion be stricken from the files on the grounds that
“the plaintiff was not a party to the suit, and that because he was not a party his rights were not affected, and he was in no manner barred, denied, or estopped from pursuing any legal right or remedy he might claim in an independent suit against the defendant concerning the property.” 103 Kan. at 64.
The federal court agreed with the defendant and struck the plaintiffs motion from the files.
The plaintiff then filed a lawsuit in Kansas in state court to recover the farm, claiming the defendant took title with notice of Peltzer’s fraud and the defendant did not qualify as a purchaser for value. In response, the defendant claimed he was a purchaser for value, without notice of Peltzer’s fraud, and pleaded res judicata as a defense. Based on the evidence presented, the court found in favor for the plaintiff.
*581On appeal, the court in Hamish affirmed the lower court’s factual findings and held the defendant had failed to prove the defense of res judicata. Reviewing the facts of the federal action, the court ruled that “[o]ne who succeeded in having stricken from the files a motion to modify a decree made by one not a party to the suit, on the ground that the decree did not bind the mover, cannot afterwards assert that the decree is res judicata against the mover.” 103 Kan. 61, Syl. ¶ 2. The court reasoned:
“It seems the defendant regarded it as important to keep the plaintiff out of the federal court case, and, having prevented the plaintiff from obtaining an adjudication of his motion on the very ground that the decree did not adjudicate anything against the plaintiff, the defendant cannot now be heard to say otherwise.” 103 Kan. at 64.
We must emphasize the fundamental principle on which claim preclusion is founded is that the party had the opportunity to litigate the claim in the former action. Here, the Knowles never had that opportunity because of Fleetwood’s actions. The facts show that in the first lawsuit, Fleetwood argued to the district court that Knowles could not make a complaint about the crack until it presented Fleetwood tire opportunity to repair or fix the crack. The district court agreed with Fleetwood and excluded these claims from consideration by the jury. But after the Knowles presented their request for repairs of the crack in compliance with the 3-year structural warranty, Fleetwood refused to comply, alleging the Knowles had waived any repairs to the crack because of what had occurred in the first lawsuit. This shift in position by Fleetwood essentially denied the Knowles’ ability to have this claim litigated.
Both Craig and Harnish would dictate that Fleetwood’s success in having these claims stricken from the first lawsuit would not preclude the Knowles from raising these claims in the present action. The Knowles did not litigate their claims for breach of warranty and their Kansas Consumer Protection Act claims for the crack until they made a request for repairs of the crack, at the insistence of Fleetwood. Fleetwood’s actions in the prior lawsuit, preventing litigation of these claims arising from the crack in the side wall, amount to a waiver of the defense of res judicata.
*582 This case is unaffected by the Knowles’ failure to appeal the prior action.
Fleetwood maintains the Knowles should have appealed the district court’s ruling to save their claims from claim preclusion, citing Ellis v. State Farm Mut. Auto. Ins. Co., 249 Kan. 599, 822 P.2d 35 (1991). In Ellis, Jack R. Ellis was injured in an automobile-pedestrian accident. State Farm Mutual Automobile Insurance Company insured both Elhs, the pedestrian, and Horace Whittaker, the driver of the automobile that struck Ellis. Under Ellis’ insurance pohcy, State Farm paid Ellis $61,151.21 in personal injury protection (PIP) benefits. Elhs also sued Whittaker. In that suit, State Farm intervened to assert a hen against the PIP benefits it paid to Elhs. The case settled for $175,000. Thus, State Farm mailed Whit-taker’s automobile insurance’s pohcy hmit of $25,000 to the court, which was then ordered to be reimbursed to State Farm under its PIP hen. Ellis did not appeal the court’s order of reimbursement.
Less than a year later, the Kansas Supreme Court issued an opinion, deciding that “a PIP insurer is not entitled to reimbursement for prior PIP payments out of payments made on behalf of a tortfeasor on a settlement or on a judgment when such payments are not duplicative of the PIP benefits” in State Farm Mut. Auto. Ins. Co. v. Kroeker, 234 Kan. 636, 676 P.2d 66 (1984). Relying on that ruling, Ellis moved to change the district court’s judgment payment of the $25,000 to State Farm. But the district court refused to change the judgment because Ellis had failed to appeal tire decision. The Court of Appeals affirmed the decision in Ellis v. Whittaker, 10 Kan. App. 2d 676, 709 P.2d 991 (1985). See Ellis, 249 Kan. at 600-01.
Subsequently, Ellis filed a petition asking for judgment in the amount of $107,374.61 for interest due to Ellis for the district court’s pay-out judgment based on a provision in Whittaker’s insurance pohcy. After the lawsuit was transferred to the county which had dealt with the original case, the district court determined that State Farm was required to pay postjudgment interest on plaintiff s entire $175,000 judgment from the date of the settlement through the date the settlement draft was received from the *583court. State Farm paid the interest. Ellis appealed. State Farm did not cross-appeal.
On appeal, the majority of the Court of Appeals held the doctrine of res judicata barred Ellis’ interest claim in Ellis v. State Farm Mut. Auto. Ins. Co., No. 64, 751, unpublished opinion filed February 15, 1991; See Ellis, 249 Kan. 601-02. Ellis petitioned for review of the Court of Appeals decision, which the Supreme Court granted. In affirming the Court of Appeals decision, the Supreme Court held that Ellis’ failure in directly attacking the district court’s reimbursement ruling did not subsequendy allow splitting the cause of action by filing a second lawsuit to obtain interest claimed on the original judgment. 249 Kan. at 603-05. The Supreme Court ruled that “[n]o principle of law exempts a person from the application of the doctrine of res judicata because the effort to break a single cause of action into two or more parts was due to neglect, accident, mistake, ignorance, or a subsequent change in the law.” 249 Kan. at 604.
Contraiy to Fleetwood’s argument, this case is distinguishable from Ellis. The Knowles’ effort to claim damages for the crack in this action did not arise from “neglect, accident, mistake, ignorance, or a subsequent change in the law,” as in Ellis. But it arose from Fleetwood’s actions precluding these claims from the first lawsuit. Rather, the Knowles’ actions are similar to the plaintiff s actions in Famish where the plaintiff filed a separate lawsuit after the defendant prevented the plaintiff “from obtaining an adjudication of his motion on the very ground that the decree did not adjudicate anything against the plaintiff’ instead of trying an appeal of the federal district court’s ruling. 103 Kan. at 64.
Simply put, Fleetwood’s shifting arguments for excluding claims surrounding the crack convince us of the following. First, Fleet-wood asserted the Knowles’ right to recover damages for the crack did not exist until after they gave Fleetwood an opportunity to repair the crack; it argued, “[Fleetwood doesn’t] see how it gets to part of the lawsuit that they’re complaining [of] . . . when [Fleet-wood has] never had any opportunity to work on it.” Second, by taking tins position, Fleetwood did not consider the Knowles’ settlement negotiations request for repairs of the crack enough notice. *584Third, the Knowles were unaware that they had lost the opportunity to present their claim for damages associated with the crack until the jury trial occurred, where the district court issued its final and confusing ruling over the matter.
Our review of the transcript discloses the Knowles’ misunderstanding of the district court’s ruling at the motion in limine hearing was not done in bad faith. So, because the Knowles followed Fleetwood’s requirements by issuing a written request for repairs of the crack, which Fleetwood then denied, the Knowles acted properly in filing their claims in a second lawsuit. Had the Knowles instead appealed the district court’s ruling in the first lawsuit, it would have been ineffectual since the Knowles had not formally requested Fleetwood to repair the crack until after the first lawsuit had been completed.
Finally, we also must point out the Knowles’ Kansas Consumer Protection Act claim in this lawsuit centers on Fleetwood’s failure to pick up the Bounder in January 2005 as it had agreed. This conduct all occurred after the first lawsuit was under way. Yet the trial court, finding res judicata, broadly swept away the consumer claim with the same broad ruling as the warranty claim. Neither were barred by res judicata.
Reversed and remanded for trial.