We are asked to decide whether a pendent prior divorce action provides sufficient grounds to dismiss a second divorce complaint brought in an adjacent county by the same plaintiff. In light of the objectives of the Divorce Code of 1980, we find that it is sufficient and we therefore affirm.
Appellant Ermyl E. Gibson (Husband) appeals from the trial court’s order of July 1, 1987 sustaining the Preliminary Objections of the appellee Elsie K. Gibson (Wife). The order dismissed Husband’s second Complaint in Divorce filed in Westmoreland County on April 2, 1987. By preliminary objection Wife maintains that a prior divorce action, still pending in Somerset County, warrants dismissal of the second action. Husband argues that the trial court erred in finding that the prior case was the same as the second and in thus dismissing the second action. He contends that because the second action alleges a different ground for divorce, it is a new, distinct case.
We should affirm the grant of the preliminary objections if the dismissal is clearly warranted and free from doubt. Stein v. Richardson, 302 Pa.Super. 124, 448 A.2d 558 (1982) (en banc). In ruling on the preliminary objections, we must consider only those facts set forth in the complaint itself. International Union of Operating Engineers, Local No. 66 v. Linesville Construction Company, 457 Pa. 220, 322 A.2d 353 (1974). The facts before this court as set forth in Husband’s complaint are as follows:
A prior Action in Divorce was filed by [Husband] ... in the Court of Common Pleas of Somerset County— This Action is still pending, however, [Husband] has filed a Motion to Discontinue the Action in Somerset County. The prior action that is still pending in Somerset County alleges irretrievable breakdown of the marriage only and requests a Divorce pursuant to Section 201(c) of the Divorce Code____ [Wife] filed an answer to the Com*174plaint ... in Somerset County, however, no other action has been taken in that case by either party____
We take judicial notice that the Court of Common Pleas of Somerset County denied Husband’s Motion to Discontinue his action there by Order of April 9, 1987. On April 2, 1987, Husband filed a new Complaint in Divorce in Westmoreland County alleging indignities. Wife filed preliminary objections to the complaint pursuant to Pa.R.C.P. 1017(b)(5) asking the court to dismiss the complaint on the basis of the prior action pending in Somerset County. A trial court en banc heard arguments. On July 1, 1987, the Honorable John E. Blahovec by order and opinion sustained Wife’s objections and dismissed the action, relying on the liberal joinder provisions of the Divorce Code of 1980, which would allow Husband to seek relief in the Somerset County action by simply amending- his complaint to include indignities grounds.
In Gantz v. Gantz, 338 Pa.Super. 528, 488 A.2d 17 (1985), upon which the trial court relies, this Court held that the intent of the Divorce Code of 1980:
is to make mandatory, rather than permissive, the consolidation of all issues germane to the dissolution of a marriage so as to prevent fragmentation____
Gantz, 338 Pa.Super. at 532, 488 A.2d at 19. We agree with the trial court’s application of Gantz. In Gantz, the wife was the defendant in a Delaware County Divorce action in which the sole issue was dissolution of the marriage. She then instituted another divorce action in Montgomery County which included economic issues. Subsequently she filed exceptions to the original Delaware County action. These alleged that the Delaware County court was without jurisdiction to proceed to final judgment because of the existence of the Montgomery County action which included the economic claims. The Delaware County court issued a divorce decree from which the wife appealed. This Court found that the filing of the Montgomery County action was “violative of the spirit, if not the letter of the joinder and counterclaim provisions of the 1980 Divorce *175Code,” Gantz, 338 Pa.Super. at 532-33, 488 A.2d at 19. The Court wrote that while the rules prior to the Divorce Code of 1980:
allowed for ... counterclaims while making them clearly permissive in nature and retained the option of separate actionsf,] [w]e feel that 23 Pa.C.S. § 301(a) must be interpreted to require consolidation of all issues in divorce so as to counter the “monumental waste of judicial time and litigant’s money” which is represented by continued application of an antiquated procedure no longer justifiable by circumstances or policy.
Gantz, 338 Pa.Super. at 532, 488 A.2d at 20 (citations omitted).1 The Gantz holding is broad in scope and does *176not warrant Husband’s narrow reading that Gantz, involving a complaint and a counterclaim, is not applicable to the case at bar, which involves two complaints.
The facts in the case before us argue strongly for the consolidation of all the claims into one action. Husband’s two divorce complaints relate to the same issue, whether or not a divorce should be granted. That each complaint alleges a different ground for divorce is immaterial. This Court’s rationale in Restifo v. Restifo, 339 Pa.Super. 352, 489 A.2d 196 (1985) supports our conclusion. Restifo held that the husband was entitled to present evidence on his counterclaim for adultery and indignities before the court ruled on the merits of the wife’s no-fault claims. The Court pointed out that the Divorce Code sets forth fault and no-fault bases as alternative grounds for divorce. See 23 Pa.C.S. § 201. Therefore, the proper way for a court to decide a divorce case is to consider together all the evidence supporting each ground. After hearing all the evidence, the court then determines upon which basis it will grant the divorce. ■ Restifo, supra. The court, not the parties, decides upon the ground for divorce.
Husband relies on a Northumberland County case, Tobias v. Tobias, 19 Pa.D. & C.3d 354 (1981). Tobias held that a prior divorce action filed in 1976 alleging indignities did not bar an action brought under the 1980 Code in another county alleging irretrievable breakdown. Hence, Tobias is inapposite. Husband ignores its determinative historical context and thus distorts its holding. The 1976 fault-based action was brought under the old divorce law, while the second, no-fault action was brought after the 1980 Code became effective. The bill of particulars required under the old law to prove an action based on fault grounds such as indignities has no application in a no-fault action under the new Code. Jakstys v. Jakstys, 326 Pa.Super. 367, 474 A.2d 45 (1984). Under these transitional circumstances, the Tobi*177as court let both actions stand.2
We now have before us an entirely different situation. Both of Husband’s complaints were brought under the Divorce Code of 1980. Section 301 of the Code mandates that all issues involved in one divorce be tried together. Gantz v. Gantz, supra. Marinello v. Marinello, 354 Pa. Super. 471, 512 A.2d 635 (1986) (en banc). See also Altschuler v. Altschuler, 334 Pa.Super. 111, 482 A.2d 1106 (1984). As the trial court in the case at bar stressed, “With the liberal joinder provisions of the Code, there is no logical reason to permit maintenance of separate divorce actions.” Opinion of 7/1/87 at 4.
We adopt the reasoning of Judge Blahovec. Two actions for this one divorce would foster fragmentation, create economic hardship for one of the parties and destroy judicial economy. Nor is husband prejudiced by the dismissal of his Westmoreland County action. He can amend his Somerset County complaint to include the ground of indignities. The trial court’s granting of Wife’s preliminary objections was warranted by the Divorce Code of 1980. We thus affirm the Westmoreland County court’s order dismissing Husband’s second divorce complaint.
Order affirmed.
. Section 301 reads in pertinent part as follows:
23 P.S. 301. Jurisdiction
(a) The courts of this Commonwealth.... shall have original jurisdiction in cases of divorce____and, where they have jurisdiction, shall determine in conjunction with any decree granting a divorce or annulment the following matters, where raised in the complaint or the answer and issue appropriate decrees or orders with reference thereto and may retain continuing jurisdiction thereof:
(1) The determination and disposition of property rights and interests between spouses____
(2) The future care, custody and visitation rights as to children____
(3) Any support or assistance which shall be paid for the benefit of any children of such marriage____
(4) Any property settlement____
(5) Any other matters pertaining to such marriage and divorce or annulment authorized by law and which fairly and expeditiously may be determined and disposed of in such action.
23 P.S. § 301 (Purdon Supp.1987).
Former Pa.R.C.P. 1130(b) barred counterclaims in divorce actions. The rule was amended in 1961 to allow such a counterclaim. Even under the old rule, two separate divorce actions in the same county, each brought by one spouse, could be consolidated. Rules 1121 to 1137 were rescinded June 27, 1980, effective July 1, 1980, the effective date of the new Divorce Code. See Goodrich Amram 2d § 1130(b):l. Both the Gantz Court and the trial court in the instant case identified a source of confusion on the subject of joinder of claims and parallel jurisdiction in divorce cases. The case of Betz v. Betz, 103 Pa.Super. 306, 157 A. 359 (1931), decided at a time when counterclaims were not permitted in divorce, has been relied upon in recent lower court decisions. See Gantz, 338 Pa.Super. at 532 n. 4, 488 A.2d at 20 n. 4. Betz held that parallel jurisdiction was permissible because it was the only way to eliminate the deadlock which resulted from the denial of a divorce to a plaintiff when the defendant also had grounds for divorce. Gantz, supra; Goodrich Amram 2d 1130(b):!. This ruling *176came before the 1961 amendment to Rule 1130(b) and of course came before the 1980 Code.
. The Tobias court applied the test articulated in Hessenbruch v. Markle, 194 Pa. 581, 45 A. 669 (1900) that a prior action bars a present one if the case is the same, the parties are the same, and the rights asserted and the relief prayed for are the same. The court concluded that the cases in question were not the same because the grounds for divorce and the proof required under the old law are radically different from the grounds for divorce and the proof required under the Code of 1980. A recent decision by this Court applied the Hessenbruch test to a challenge to parallel divorce actions brought under the new Code and reached the opposite result. See Lowenschuss v. Selnick, 324 Pa.Super. 193, 471 A.2d 529 (1984). Applied to the case before us, the test yields the conclusion that the rights at issue in the two divorce actions are the same, the right to a divorce. The relief sought is the same, the grant of a divorce. Hence, the two cases are the same and, under Hessenbruch, it is proper to dismiss the second action.