
988 P.2d 211 (1999)
133 Idaho 437
August V. KLAUE, Plaintiff-Appellant,
v.
Alan HERN, Executive Vice President and General Manager of Regulus Stud Mills, Inc.; Caroline Rice Hern, Personal Representative of the Estate of Jack A. Hern, deceased; Regulus Stud Mills, Inc., an Idaho corporation; and Arlen B. Looney, Jr., its Secretary/Treasurer, Defendants-Respondents.
Nos. 24456, 24138.
Supreme Court of Idaho, Lewiston, April 1999 Term.
September 22, 1999.
*212 Law Offices of Charles A. Brown, Lewiston, for appellant. Charles Brown argued.
Witherspoon, Kelley, Davenport & Toole, P.S., Coeur d'Alene, for respondents. Edward Anson argued.
SILAK, Justice.
This is an appeal from an order granting a motion to dismiss appellant August V. Klaue's complaint for declaratory judgment, specific performance of a stock transfer agreement and an accounting and from an order granting attorney fees and costs. For the reasons stated below, we vacate the order of dismissal and the award of attorney fees and costs and remand for further proceedings.

I.

FACTS AND PROCEDURAL BACKGROUND

A. Facts
August V. Klaue (Klaue) is a shareholder and officer of respondent Regulus Stud Mills (Regulus), an Idaho corporation with its principal place of business in St. Maries, Idaho. Regulus was formed in 1959 by Jack Hern, now deceased, and two other individuals. Eventually, Jack Hern, Arlen Looney, Sr., and Klaue became the sole shareholders, each with a one-third interest.
On October 27, 1975, the three shareholders entered into a buy-sell agreement. The agreement required that upon the death of any of the stockholders, the estate of the deceased stockholder would sell all of its shares to Regulus. The agreement also required Regulus to purchase the shares from the estate, using the proceeds from a life insurance policy purchased by Regulus on the life of each shareholder. The agreement allowed shareholders to make inter vivos gifts to blood members of their immediate family. In 1988, Arlen Looney, Sr. died, and Jack Hern and Klaue became the sole shareholders pursuant to the buy-sell agreement.
Between December 5, 1990, and July 31, 1993, Jack Hern gifted all but one of his shares in Regulus to his children, John Hern, Kathryn Hern, and respondent Alan Hern, Jack Hern retained only one share, represented by Certificate No. 49, in order to remain eligible for continuing membership on the Regulus board of directors. Jack Hern remained on the board until November 8, 1996, when he died of cancer. Shortly after Jack Hern's death, respondent Alan Hern presented Klaue and Arlen Looney, Jr. (Looney) with Certificate No. 49, which was signed by Jack Hern and dated November 1, 1996. Klaue and Looney refused to transfer ownership of the stock to Alan Hern.

B. Procedural Background
On January 2, 1997, Alan Hern filed an application for an alternative writ of mandamus in the superior court in Spokane, Washington to compel Klaue and Looney to register the transfer of ownership. The Washington court found personal jurisdiction because all of the individual parties were residents of Spokane, Washington. On January 15, 1997, Klaue filed a complaint in this action, seeking a declaratory judgment stating that Jack Hern owned the stock at the time of his death. Klaue also sought specific performance of the Regulus buy-sell agreement.
A mandamus hearing was held on January 17, 1997 before the Honorable Craig Sypolt, a district judge of the Washington Superior Court, Spokane County. During the hearing, Judge Sypolt refused to hear any evidence regarding the ownership of Certificate No. 49, focusing instead on whether Klaue and Looney had a duty to register the transfer of stock to Alan Hern. Judge Sypolt announced his decision in a letter opinion dated February 5, 1997. On February 7, 1997, Judge Sypolt issued a writ of mandamus, finding that Klaue and Looney had a "clear and present duty" to register the transfer under Section 28-8-401 of the Idaho Code. The writ, prepared by Alan Hern's attorney, stated that the court found that "it *213 is uncontroverted that Alan Hern is the rightful owner of the one (1) share of Regulus represented by Stock Certificate No. 49 indorsed by Jack Hern...." Klaue appealed the writ to the Washington Court of Appeals, Third Division. On March 19, 1997, Klaue filed a notice of claim for the stock against the Jack Hern estate, seeking to obtain the stock through the probate proceedings.
After securing the writ, Alan and Caroline Hern moved to dismiss the Idaho case pursuant to Idaho Rule of Civil Procedure 12(b)(8) because a case involving the same parties and issues was pending in another court. The Honorable Craig C. Kosonen, district judge, granted the motion and dismissed the case on July 31, 1997, noting that the issues involved in this case were identical to those addressed in the mandamus action and the probate proceedings. Judge Kosonen also awarded attorney fees to Alan and Caroline Hern pursuant to I.C. § 12-120(3). Klaue appealed the order of dismissal and the award of attorney fees.
After this appeal was filed, the Washington Court of Appeals released an opinion holding that the superior court was correct in ruling that Klaue and Looney had a duty to register the transfer of the stock. Hern v. Looney, 90 Wash.App. 519, 959 P.2d 1116 (1998). The court of appeals also held, however, that the writ was defective because it stated that Alan Hern was the rightful owner of the stock, even though Judge Sypolt refused to consider evidence regarding the validity of the transfer. The Washington Court of Appeals remanded the case to the trial court for correction of the writ.

II.

ISSUES ON APPEAL
The issues presented on appeal are as follows:
1. Whether the district court erred in dismissing the present action on the ground that another similar action was pending in another court.
2. Whether the district court erred in awarding attorney fees to the respondents on the grounds that respondents were the prevailing party.

III.

STANDARD OF REVIEW
The trial court's determination under I.R.C.P. 12(b)(8) whether to proceed with an action where a similar case is pending in another court is discretionary. See Zaleha v. Rosholt, Robertson & Tucker, Chtd., 129 Idaho 532, 533, 927 P.2d 925, 926 (Ct.App.1996). This decision will not be overturned on appeal unless the trial court abuses its discretion. See id. When a trial court's discretionary decision is reviewed on appeal, the appellate court considers "(1) whether the lower court correctly perceived the issue as one of discretion; (2) whether the lower court acted within the boundaries of such discretion and consistently with any legal standards applicable to the specific choices before it; and (3) and whether the court reached its decision by an exercise of reason." Id. (citing Sun Valley Shopping Ctr., Inc. v. Idaho Power Co., 119 Idaho 87, 94, 803 P.2d 993, 1000 (1991)).

IV.

ANALYSIS

A. The District Court Erred In Granting The Motion To Dismiss.
Under I.R.C.P. 12(b)(8), a trial court may dismiss an action where there is "another action pending between the same parties for the same cause." Klaue argues that the district court erred in dismissing his case because the ownership of the Regulus stock has not yet been adjudicated, and the issue is not pending before another court. Klaue argues that while the ownership of the stock is contested in the Washington probate proceedings, the probate proceedings do not constitute "another action" that triggers Rule 12(b)(8). Klaue also argues that since the Washington Court of Appeals has held that the mandamus litigation did not address the ownership of Stock Certificate No. 49, the Idaho district court is the only forum where the ownership of the stock is being adjudicated.
*214 Two tests govern the determination of whether a lawsuit should proceed where a similar lawsuit is pending in another court. First, the court should consider whether the other case has gone to judgment, in which event the doctrines of claim preclusion and issue preclusion may bar additional litigation. See Wing v. Amalgamated Sugar, 106 Idaho 905, 908, 684 P.2d 307, 310 (Ct.App.1984); cf. Roberts v. Hollandsworth, 101 Idaho 522, 616 P.2d 1058 (1980) (holding that state action was precluded by a judgment entered in federal court). While the writ of mandamus issued in the Washington court acts as a final judgment in that case, the Washington Court of Appeals has held that the trial court in that case did not adjudicate the ownership of the disputed share of stock. See Hern, 959 P.2d at 1121-22. Since there is no final judgment resolving the ownership of the stock, the doctrines of claim and issue preclusion do not bar Klaue's claims before the district court in Idaho.
The second test is whether the court, although not barred from deciding the case, should nevertheless refrain from deciding it. See Wing, 106 Idaho at 908, 684 P.2d at 310. The determination of whether to proceed with a case where a similar case is pending elsewhere, and has not gone to judgment, is discretionary, and will not be overturned absent an abuse of that discretion. See Zaleha, 129 Idaho at 533, 927 P.2d at 926; Wing, 106 Idaho at 908, 684 P.2d at 310. The Court of Appeals in Diet Ctr., Inc. v. Basford, 124 Idaho 20, 22-23, 855 P.2d 481, 483-84 (Ct. App.1993), suggested several guidelines for exercising such discretion:
In deciding whether to exercise jurisdiction over a case when there is another action pending between the same parties for the same cause, a trial court must evaluate the identity of the real parties in interest and the degree to which the claims or issues are similar. The trial court is to consider whether the court in which the matter already is pending is in a position to determine the whole controversy and to settle all the rights of the parties. Additionally, the court may take into account the occasionally competing objectives of judicial economy, minimizing costs and delay to litigants, obtaining prompt and orderly disposition of each claim or issue, and avoiding potentially inconsistent judgments.
(emphasis added) (citations omitted).
The parties and issues involved in this case are similar to those in the Washington mandamus proceedings. However, the Washington courts, at least in the mandamus and probate actions, have not been in a position to determine the whole controversy and settle all the rights of the parties.
The reliance on the probate proceedings was incorrect because under Washington law, the probate court will not determine the ownership of the stock. When a notice of claim is filed with the probate court, the personal representative has a duty to either accept or reject the claim. See Revised Code of Washington § 11.40.080. If the personal representative rejects a claim against the estate, the claimant must bring a separate suit against the estate to satisfy the claim. See R.C.W. § 11.40.100. "The probate court of this state contains no provision for a review of the rejection of a creditor's claim. Under the statute an action must be commenced upon the rejected claim. It is an ordinary civil action; it is not part of the probate proceedings." Schluneger v. Seattle-First National Bank, 48 Wash.2d 188, 292 P.2d 203, 204 (1956) (interpreting the prior enactment of R.C.W. § 11.40.100); see also McWhorter v. Bush, 7 Wash.App. 831, 502 P.2d 1224, 1225 (1972). "The effect of any judgment rendered against a personal representative shall be only to establish the amount of the judgment as an allowed claim." R.C.W. § 11.40.120.
Therefore, the probate proceedings will not address the ownership of the Regulus stock; the probate court will require satisfaction of the claim only when or if Klaue obtains a judgment in his favor. The Washington probate court is not in a position to determine the whole controversy and to settle all the rights of the parties. Additionally, the notice of claim was filed in the Washington probate court after this action was filed in the Idaho district court. The court which first acquires jurisdiction over a controversy should retain that jurisdiction and dispose of *215 the controversy. See Diet Ctr., Inc., 124 Idaho at 22, 855 P.2d at 483 (quoting 21 C.J.S. § 188 at 222 (1990)). Accordingly, the district court abused its discretion under the Sun Valley Shopping Center test when it ruled that the Washington probate proceedings constituted a "pending action involving the same issues and parties" that justifies dismissal.
The mandamus proceeding did not adjudicate the issue of the ownership of the Regulus stock. The respondents argue that "all issues regarding the right to the stock certificate have been resolved by the Washington mandamus proceeding." This argument is unpersuasive. During the mandamus hearing, Judge Sypolt refused to hear testimony related to the issues pending in this action: "I don't want to engage in the mini trial of the matter that is pending in another state in this court. And the [Idaho] complaint is before the court, and as I have said, I have noticed it." Hern, 959 P.2d at 1118. Counsel for Klaue in the mandamus action understood that the mandamus action would not address the ownership of the stock, but was concerned that "it might be contended in the Idaho litigation that somehow ... the writ of mandamus forecloses that issue...." Counsel for Klaue also "asked the court to make clear that his order did not decide matters addressed in the Idaho proceeding," but that request was denied.
The Washington Court of Appeals held that the Washington district court rightfully abstained from addressing the issue of the ownership of the stock:
This mandamus action was limited solely to the question whether the corporation should be compelled to register the transfer of Certificate No. 49. Mr. Hern's counsel agreed that the lawful ownership of the share "is not an issue in this case at this time." Despite this understanding, Alan Hern presented and the superior court approved an order finding that "it is uncontroverted that Alan Hern is the rightful owner of the one (1) share of stock of Regulus represented by Stock Certificate No. 49 indorsed by Jack Hern" and that Regulus had improperly failed to issue a new certificate "evidencing [Alan Hern's] ownership of said share...."
Id. at 1121-22. The Washington Court of Appeals also noted that the "limited [mandamus] action here was never intended to adjudicate the validity of Jack Hern's purported gift to Alan Hern." Id. at 1120. The Washington Court of Appeals remanded "for entry of a writ appropriately limited to requiring the immediate transfer of the share." Id. at 1122. The registration of the transfer of the stock does not conclusively determine the actual ownership of the stock in and of itself; Section 28-8-404 of the Idaho Code states that an issuer is liable for wrongful registration of the transfer "if the issuer has registered a transfer of a security to a person not entitled to it...." Since the Washington court hearing the mandamus action did not "determine the whole controversy" and "settle all the rights of the parties," the Idaho district court abused its discretion under the three-step Sun Valley Shopping Ctr. test when it relied upon the mandamus action as the reason for dismissing this case.
In conclusion, since there is no pending litigation involving the same parties and issues, this Court vacates the order dismissing the action.

B. The District Court Erred In Awarding Attorney Fees To The Respondents On The Grounds That Respondents Were The Prevailing Party.
Klaue contends that the Herns are not entitled to the attorney fees awarded by the trial court under I.C. § 12-120(3). Since we vacate the district court's dismissal order, the Herns are not the prevailing party and the order granting them attorney fees and costs is also vacated.

V.

CONCLUSION
The order of the district court dismissing the complaint, and the order of the district court awarding attorney fees and costs are vacated and the case is remanded for proceedings consistent with this opinion. No *216 attorney fees are awarded on appeal. Costs on appeal are awarded to appellant Klaue.
Chief Justice TROUT, Justices WALTERS and KIDWELL concur.
Justice SCHROEDER, concurring in result.
I concur in the result but disagree with the use of the abuse of discretion standard in part IV.A. of the opinion. The district judge relied upon a judicial order entered by a court in the state of Washington in the mandamus proceedings. Subsequently, that order was remanded by the Washington Court of Appeals. The legal landscape changed which meant that the district court in Idaho had relied upon a court determination in Washington that was set aside on appeal. While this undercut the rationale of the district court in Idaho, it was not an abuse of discretion to rely upon the order in the mandamus proceedings in Washington. There was a mistake of law resulting from reliance on the Washington order, but that does not constitute an abuse of discretion.
