The judgments in a prior case in favor of the defendants in this case do not bar this action. Those judgments were entered after demurrers were sustained on August 23, 1972; after a motion to amend the declaration was filed on August 30, 1972 (within the time provided in Rule 23 of the Superior Court ); and after the denial on October 11, 1972, of what was apparently a substitute motion to amend filed on October 2, 1972. The demurrers were based on matters of form and substance and were sustained generally. There is nothing to indicate that the demurrers were sustained on any particular ground going to the merits (see Hacker v. Beck, 325 Mass. 594 , 598 ) or that the motion to amend was denied because the amendment failed as matter of law to cure a defect, if any, in the declaration. Sullivan v. Farr, 2 Mass. App. Ct. 815 (1974). Contrast Martin v. Hunt, 352 Mass. 774 (1967); Osserman v. Jacobs, 369 Mass. 200 , 202-205 (1975). Accordingly, the defense of res judicata is not available to the defendants. (All the proceedings in the Superior Court in this case and in the earlier case occurred prior to the new rules of civil procedure. See Osserman v. Jacobs, 369 Mass. 200 , 205-206 .) The orders sustaining the answers in abatement are reversed.
Except for the fact that the contract in this case was for one year rather than three, the facts of this case are parallel in every material respect to those of Duggan v. Taunton, 360 Mass. 644 (1971), and this case is controlled by the principle stated therein, at 649-650: "Public policy requires
assuring municipal bodies that they, as well as other clients, as persons `in need of legal help,' shall have `freedom to select an attorney [and] to change attorneys' [quoting from Walsh v. O'Neill, 350 Mass. 586 , 590 (1966)]. . . . Between a municipal body or board and its legal advisers, it is desirable that there be a relationship of trust and confidence. Except where a valid contract, a clearly expressed statutory policy, or some special exigency requires a different result, we should be slow to permit a `lame duck' municipal body to dictate to its successors the choice of the attorneys who are to advise them." Although the Duggan case was careful not "to lay down any inflexible rule about contracts for attorneys' services made by municipal or other public boards for periods extending beyond the period when the board making the contract can control the actions of the board" (360 Mass. at 651; emphasis supplied), according to our reading (see especially 651-652) it imposes on the attorney seeking to enforce a contract for general legal services the burden of showing justification when the contract is "to commence . . . after the contracting body will cease to control the choice of counsel . . ." (360 Mass. at 651; emphasis supplied). The record in this case does not show sufficient justification for an appointment spanning the entire life of the new board membership (even though the board itself is clearly a continuing body), and it is therefore unnecessary to consider whether certain of the trial judge's general findings or conclusions went beyond what was properly inferable from the auditor's findings and the statement of agreed facts. If the question of public policy was not sufficiently raised by the final paragraph of the defendant's answer, it was nevertheless proper for the trial judge to consider that question. Gleason v. Mann, 312 Mass. 420 , 422 (1942). No question has been raised as to the form of the judgment.