Engerud, J.
This action was commenced in justice court. On the return day of the summons the defendant appeared and filed a demurrer to the complaint on the ground that it did not set forth a cause of action. After the justice had overruled the demurrer, the defendant demanded a change of venue to some other justice, pursuant to the provisions of section 6652, Rev. Codes 1899. The motion was supported by a sufficient affidavit, alleging *65as grounds for such change that the justice before whom the action was pending was biased and prejudiced against defendant. The defendant was refused on the ground that it came too late. The defendant declined to answer the complaint, insisting that the demand for change of venue was in time and that the justice was thereby deprived of all further power in the case, except to transfer it to another justice. The justice entered judgment for plaintiff, and the defendant appealed to the district court on questions of law only.
The specifications of error on that appeal challenge the propriety of the justice court judgment solely on the ground that the justice erred in denying the motion for change of venue. The district court affirmed the judgment, and we think that decision was right. Section 6652, Rev. Codes 1899, is part of the Justice Code, and, so far as-material to this case, provides: “The court may at any time before trial, on motion, change the place of trial in the following cases: * * * 2. When either party makes and files an affidavit that he believes that he cannot have an impartial trial before such justice by reason of the interest, prejudice or bias of the justice.” It is clear that the word “may,” as used in this statute, should be construed to mean “must.” State v. Kent, 4 N. D. 577, 62 N. W. 631, 27 L. R. A. 637. State v. Barry 14, N. D. 316, 103 N. W. 637. An affidavit and demand for change of venue, properly presented to the justice before the trial has commenced, must be granted as a matter of right. Whether or not a change can be demanded before any issue of law or fact has been joined we do not decide. We are agreed that the submission to the justice for determination of the issue of law raised by the demurrer was a- trial within the meaning of section 6652; hence the demand for change of venue came too late. The demand, to be availing, must be presented “before trial.” The Code of Civil Procedure (section 5419, Rev. Codes 1899) declares that “a trial is the judicial examination of the issues between the parties, whether they are issues of law or of fact.”
Appellant concedes that the examination of the issue of law arising on a demurrer in an action pending in district court is a trial, but he contends. that the foregoing statutory definition of a trial does not apply to the examination and determination of an issue of law in justice court. Counsel argues that there is an essential difference between the effect of a demurrer in justice court and *66the effect thereof in district court. We do not think there is any substantial difference. It is true that the district court may in its discretion render final judgment in the action on the trial of an issue of law, and that leave to amend after demurrer sustained, or leave to join issue on the facts alleged after a demurrer overruled, may be granted or withheld by that court in its discretion. In practice, however, leave to amend, or leave to take issue on the facts after the determination of an issue of law, is always granted as a matter of course, unless some special reason appears to justify the withholding of such leave. In justice court the right to amend after demurrer sustained, or to take issue on the facts after a demurrer is overruled, is an unconditional statutory right. Sections 6662, 6665, Rev. Codes 1899. In either court, however, the function of the demurrer is to obtain the opinion of the court on a question of law based on an assumed state of facts; and in either court the decision on the argument of the demurrer is necessarily a final determination by that court of the rights of the parties with respect to the matters involved in that decision, unless the assumed facts can be successfully disputed or avoided by proof, or unless the party whose pleading has been held insufficient can prove at the trial the facts necessary to cure the deficiency. Whatever difference there may be in theory between the authority of the two courts with respect to rendering a formal and final judgment on an issue of law, in actual practice the effect and result of a decision of such a question is the same in one court as in the other. We think the definition of the word “trial,” given in the Code of Civil Procedure, is applicable to the procedure in justice court, and that definition must be applied in this case; there being no provision in the Justice Code attaching a different meaning to the word. The provisions of the Code of Civil Procedure govern the proceedings in justice court so far as applicable, where there is no express provision on the subject in the Justice Code. Section 6625, Rev. Codes 1899.
To hold that the word “trial,” in section 6652, means merely the trial of an issue of fact, would lead to results which we are satisfied the legislature never intended. If the justice, in deciding the question raised by the demurrer, disclosed that his opinion as to the law applicable to the case differed from that of the litigant, the latter might well conclude that the justice was biased and prejudiced and thereupon demand a change of venue and present *67the same questions of law to some other justice upon whom he might hope to exert a greater influence by his display of learning and eloquence. The statute in question plainly contemplated but one trial before a single justice, and was clearly designed to enable .the party to secure a fair and impartial hearing and decision on the issues of law and fact affecting the cause of action or defense. If the party is convinced that he cannot have a fair and impartial hearing from the justice before whom the action is pending, he can remove the cause to some other justice in the manner provided by the law. It was not intended to permit a party, who had no reason to suspect before trial that the justice was unfair, to experiment with the magistrate, and to demand a trial before some other magistrate after discovering that the justice to whom the issues 'of law were first submitted entertained views of the law contrary to those advocated by the party. The following cases, based on similar statutes, support our views: Alley v. Nott, 111 U. S. 472, 4 Sup. Ct. 495, 28 L. Ed. 491; Goldtree v. Spreckles, 135 Cal. 666, 67 Pac. 1091.
(106 N. W. 296.)
The judgment of the district court is affirmed.
All concur.
Note. — Justice must-act within his township' and county. In re Dance, 2 N. D. 184, 49 N. W. 733. Judgment must be entered upon return of verdict when a jury trial is had, otherwise it will be avoided upon proper proceeding. In re Dance, Id. Justice has no jurisdiction of unlawful detainer case, where title to land is involved. Heger et al v. De Groat, 3 N. D. 354, 56 N. W. 150. Appearance to object to justice’s jurisdiction on account of insufficiency of summons is not a voluntary appearance. Miner v. Francis et al., 3 N. D. 549, 58 N. W. 343. Justice can recover his fees in a criminal action from county. Barret v. Stutsman Co., 4 N. D. 175, 59 N. W. 964. Upon a change of venue, where both parties submitted to trial, objection cannot be made that it does not appear affirmatively that they agreed upon a justice. Henry v. Maher, 6 N. D. 413, 71 N. W. 127. Justice called case; summons and proof of service were subsequently filed, and were in plaintiff’s possession. Justice did not lose jurisdiction by allowing plaintiff’s counsel to send for them. Cowan v. Farrel et al., 7 N. D. 397, 75 N. W. 771. Where nonresident plaintiff deposits, by consent of parties, an agreed sum as security for costs, upon change of venue to another justice, defendant cannot demand other security. Benoit v. Revoir, 8 N. D. 226, 77 N. W. 605. Under section 6683, Rev Codes 1899, justice can hold a case open twenty-four hours to consider questions submitted. Benoit v. Revoir, Id. Invoicing aid of court confers or restores its - j urisdiction. Id. Failure of plaintiff to appear at return hour or at the hour of postponement or within one hour *68thereafter warrants, a dismissal of the case on motion, and justice denying the motion loses jurisdiction of the case. Plano Mfg. Co. v. Stokke, 9 N. D. 40, 81 N. W. 70, s.ection 6258 Rev. Codes 1899. Exempting executors, administrators and guardians from 'giving a bond on appeal applies to county court only; not to district and justice courts. Richardson v. Campbell, 9 N. D. 100, 81 N. W. 31. Where a justice at the close of a trial adjourns the case indefinitely, he loses jurisdiction, and a judgment entered therein is void, unless jurisdiction is in some manner restored. Sluga v. Walker, 9 N. D. 108, 81 N. W. 282. Failure to serve statutory undertaking renders an appeal from justice court void, and district court cannot allow new undertaking to be served and filed. Richardson v. Campbell, supra. Garnishment law does not modify the law providing for service of summons in the principal action. Searl v. Shanks, 9 N. D. 204, 82 N. W. 734. Justice cannot issue a second garnishment summons when the first one fails of service. Searl v. Shanks, supra. In garnishment case failure to serve summons in the principal action authorizes dismissal of the action. Searl v. Shanks, supra. When the district court, upon appeal from a justice court, reopens the case for trial of an issue of fact, the case will be retained and placed on district court calendar -for trial. Grovernor v. Signor, 10 N. D. 503, 88 N. W. 278. Upon an appeal from a justice court, the district court acquires-no jurisdiction to try the case anew, wljen the justice had no jurisdiction to try it or allow a counterclaim. Vidger v. Nolin, 10 N. D. 353, 87 N. W. 593. Transcripting a justice’s judgment to the district court does not give it the same presumption afforded those of the latter court. Phelps v. McCallam, 10 N. D. 536, 88 N. W 292. Approval of undertaking upon appeal from justice court by the clerk of the district court, before it is served and filed, not necessary. Eldridge v. Knight, 11 N. D. 552, 93 N. W. 860. Insufficiency of an affidavit for postponement in justice court must be pointed out on objection to postponement, or loss of jurisdiction cannot be availed of. Lyman-Eliel Drug Co. v. Cooke, 12 N. D. 88, 94 N. W. 1041. Postponement may be had after commencement of a trial for causes arising before. Lyman-Eliel Drug Co. v. Cooke, Id. Authority to grant continuance in justice court exists only by statute. Lyman-Eliel Drug Co. v. Cooke, Id. Appeals upon law alone are not dismissed for irregularities in justice court not affecting the appeal. Olson v. Shirley, 12 N. D. 106, 96 N. W. 297. On appeals upon law alone, where the district court reopens the case for trial, the case is retained in district court for such trial. Olson v. Shirley, supra; Wilson v. Atlantic Elev. Co., 12 N. D. 402, 97 N. W. 535.
Where there is evidence before a justice of the peace sitting as a committing magistrate tending to show the commission of an offense by defendant, review and release will not be had upon habeas corpus in Supreme Court. State ex rel. Styles v. Beaverstad, 12 N. D. 527, 97 N. W. 548. A justice of the peace acting as committing magistrate must act upon evidence, and when this jurisdictional requisite is observed, his acts will not be reviewed upon habeas corpus. State ex rel. Styles v. Beaverstad, supra. His finding, when so acting, is conclusive against collateral attack. .State ex rel. Styles v. Beaverstad, Id. Complaint in justice court upon information and belief will not justify an arrest. State ex rel. Paul v. McLain, 13 *69N. D. 368, 102 N. W. 407. Filing of a transcript of proceedings in bastardy, and jurisdictional papers, had before a justice of the peace with the clerk of the district court, gives the latter court jurisdiction. State v. Carrol, 13 N. D. 383, 101 N. W. 317. In such proceeding when approved bail is furnished in justice court formal order of 'Committal to district court is unnecessary. Id. Upon complaint in justice court charging a nuisance a description of a certain one-story frame building, without giving lot or block is sufficient. State v. Wisnewske, 13 N. D. 649, 102 N. W. 883. Limitation of time for issue of execution in justice court is upon the remedy, not the life of the execution. Holton v. Schmarberk, 15 N. D. 38, 106 N. W. 36. Transcripting a judgment from a justice to district court, transfers the power to issue execution from the former to the latter. Id. Such transcript, for the purposes of a lien and execution, gives the judgment the same effect as one originally entered in district court, Id. The period limiting the time to issue an execution upon a judgment transcripted to district court means ten years from its entry by the justice. Id.