
574 N.E.2d 1240 (1991)
215 Ill. App.3d 278
158 Ill.Dec. 847
PEORIA POLICE SERGEANTS, Charles Hurt, Edward Papis, Terry Fondriest and Garry Lock, Plaintiffs-Appellees,
v.
The CITY OF PEORIA BOARD OF FIRE & POLICE COMMISSIONERS, Defendant-Appellant.
No. 3-90-0456.
Appellate Court of Illinois, Third District.
June 26, 1991.
*1241 Roy G. Davis, Peoria, Robert M. Riffle (argued), Linda L. Lougges Keck, Mahin & Cate, Peoria, for Board of Fire & Police Com'rs.
Marcia F. Straub (argued), Peoria, for Peoria Police Sergeants, Charles Hurt, Edward Papis, Terry Fondriest and Garry Lock.
Justice BARRY delivered the OPINION of the court:
The Peoria Board of Fire and Police Commissioners appeals from a judgment order of the circuit court of Peoria County invalidating the procedure used to select candidates for promotion to police lieutenant.
The disputed question giving rise to this appeal is whether the rules of the Board governing the promotional process for the rank of lieutenant in the Peoria Police Department violate the statutory directives contained in section 10-2.1-15 of the Illinois Municipal Code (Ill.Rev.Stat.1989, c. 24, par. 10-2.1-15) which sets forth the following requirement for promotion:
"The board [of fire and police commissioners], by its rules, shall provide for promotion in the fire and police departments on the basis of ascertained merit and seniority in service and examination, and shall provide in all cases, where it is practicable, that vacancies shall be filled by promotion. All examinations for promotion shall be competitive among such members of the next lower rank as desire to submit themselves to examination."
Other sections of the Code provide for the Board to make rules for carrying out appointments and removals from service (par. 10-2.1-5), to give credit for military service (par. 10-2.1-10), to give promotional examinations (par. 10-2.1-11), to make temporary appointments (par. 10-2.1-16), and other matters.
The Board's rules establish a three step promotional process for attaining the rank of lieutenant with each step having a weighted value as follows:


(1) Written examination ...........30%
(2) Oral examination ..............40%
(3) Promotional potential .........30%

According to the rules, only those candidates with scores in the top ten following the written and oral examinations of steps (1) and (2) were allowed to proceed to step (3). Furthermore, points for veterans' service and for seniority were not awarded until the end of step (3), at the conclusion of which the final ranking on the eligibility list would be determined.
The rules specify that the written and oral examinations are to test the ability of the officer to perform in the position. The "promotional potential" of step (3) was determined on the basis of an evaluation or rating by the candidates' superior officers. The parties stipulated:
"12. Neither Step (1) nor Step (2) specifically took into account the candidates' length of service within the Peoria Police Department; their length of service as a Sergeant; the opinion of the candidates held by their superiors or subordinates; commendations or reprimands; or attendance to duty or absenteeism, although *1242 each candidate had the opportunity to make references to these considerations in response to certain questions posed during the course of their oral examination (Step (2))."
In 1987 19 police sergeants for the City of Peoria took the written and oral examinations as candidates for promotion to the rank of lieutenant. Immediately after the preliminary eligibility list was posted, eight of the sergeants who had been dropped from the list filed a petition for mandamus and injunction to prevent the Board from taking any further action and to challenge the validity of the promotional process. The four plaintiffs in this cause, Charles Hurt, Edward Papis, Terry Fondriest, and Garry Lock, were among those not included in the top ten.
The circuit court first granted the sergeants a preliminary injunction but then allowed the Board's motion to dismiss. Upon appeal to this court, we affirmed the dismissal on the ground that the sergeants had to exhaust their administrative remedies before pursuing judicial remedies. Our decision was not published. Peoria Police Sergeants et al. v. City of Peoria Board of Fire and Police Commissioners (3d Dist.1989) Dkt. No. 3-88-0118.
After our appellate court decision, the Board proceeded to step (3) and ultimately certified a list of ten candidates eligible for promotion. The order of the ranking at the conclusion of step (3) was considerably different than the order of the ten candidates prior to step (3). The parties stipulated that if plaintiffs had been allowed to participate in all three steps of the promotional process, the candidates' ranking on the final list could change. However, merely adding in the seniority and veterans points at the end of step (2) would not have changed the list of those eligible for step (3).
The plaintiffs undertook an administrative appeal challenging the scores and the process used to determine the eligibility list. After a hearing, the Board ruled that the promotional process was in full compliance with the applicable statutory provisions. Plaintiffs then filed a complaint for administrative review in the circuit court of Peoria County.
After a hearing the court ruled that the promotional process used by the Board violated "both the letter and the intent of the controlling statute" by not considering seniority and ascertained merit, as required, before dropping plaintiffs from the list and was, therefore, void and unenforceable. The court remanded the cause to the Board for consideration of all applicants for promotion, and this appeal by the Board followed.
The determinative issue is whether the three step process used by the Board satisfies the requirements of section 10-2.1-15 of the Illinois Municipal Code that police promotions are to be based on ascertained merit and seniority in service and examination. We agree with the trial court that it does not.
Identical language in Ill.Rev.Stat.1961, c. 24, sec. 10-1-13, was construed by the appellate court as follows:
"It is clear from a reading of the statute that the legislature fixed three distinct elements to be considered in making promotions: ascertained merit, seniority in service and examination." Lenert v. Wilson (1st Dist.1965), 56 Ill.App.2d 325, 330, 206 N.E.2d 294, 297.
The court in Lenert v. Wilson said that the ascertainment of merit for promotion would include a rating of efficiency and would of its nature be a discretionary procedure, not a competitive examination. Lenert v. Wilson made clear that ascertained merit is to be determined separate from the examination and is to be based on the candidate's past performance on the police force.
The procedure utilized by the Peoria Board did not take into account efficiency or any other aspect of meritorious performance of police duties by the candidates before some were eliminated. Plaintiffs were entitled to have all the statutory requirements measured before the list was reduced. What happened here was that eligibility for promotion was determined on the basis of examination alone and then rank *1243 within the eligibility list was determined by step 3 where each candidate's merit was ascertained and points for seniority and for military service were added.
As previously mentioned, a comparison of the ranking of the top ten candidates at the end of step (2) with the ranking of those same candidates at the end of step (3) discloses several changes in position as a result of the "Promotional Potential Evaluation" of step (3). Two of the original top ten scored very low on step (3). The highest step (3) score was 85.27 while the two lowest scored only 19.12 and 4.38, respectively. Thus it is likely that candidates ranking below the cut off point might well have been included in the top ten if they had been allowed to complete the promotional testing process.
It is clear from the record that the decision to consider only the top ten in step (3) was made solely for administrative convenience. Department officials testified that they believed that ten candidates would be more than sufficient to fill all the vacancies anticipated in the next three years and that it would save the time of the superior officers to evaluate only the top ten. That reason does not justify ignoring the requirements of the statute.
We conclude, therefore, that plaintiffs were denied access to eligibility for promotion as guaranteed them by the law of Illinois. Steps (1) and (2) did not measure ascertained merit or seniority in service, or military service before eliminating plaintiffs from further consideration, and, as the trial court ruled, plaintiffs were deprived of a fair consideration of their qualifications for the rank of lieutenant.
The trial court was correct in holding that the decision of the Board was erroneous. This cause must be remanded to the Board for consideration of all applicants for promotion by a process compatible with section 10-2.1-15, as construed herein.
Another contention put forward by the Board is that plaintiffs should be barred from challenging the promotional process because they did not object when they first were given notice of the procedure and, instead, they acquiesced in the process by participating in it up to the point where they were eliminated. The Board frames this argument in the terms of two different equitable theories: (1) that plaintiffs are barred by equitable estoppel and (2) that they are barred by the "unclean hands" doctrine.
Equitable estoppel could be invoked if plaintiffs' conduct misled the Board by giving it grounds to believe that plaintiffs' rights would not be enforced, thereby causing the Board to act to its detriment in reliance on that belief. (Kyker v. Kyker (2d Dist.1983), 117 Ill.App.3d 547, 72 Ill. Dec. 803, 453 N.E.2d 108.) The Board argues that plaintiffs misled it into believing that there would be no challenges to its rules and regulations governing promotion until after plaintiffs had been eliminated. Since there is nothing to indicate what detriment the Board suffered by plaintiffs' participation in steps (1) and (2), this argument must fail. The Board also argues that plaintiffs' challenge was in bad faith because it did not come until after they had participated in the examinations. The logic of this argument is obscure.
The record discloses that plaintiffs put forward their objections to the promotion process at the earliest possible time after they had been injured by denial of eligibility for promotion. When the plaintiffs initially sought judicial relief, the Board successfully resisted plaintiffs' efforts to be included in step (3) in the proceeding. Plaintiffs' conduct does not give rise to equitable estoppel.
The "unclean hands" doctrine would preclude a party who is guilty of misconduct, fraud or bad faith connected to the matter being litigated from obtaining relief in a court of equity. (Comedy Cottage, Inc. v. Berk (1st Dist.1986), 145 Ill.App.3d 355, 99 Ill.Dec. 271, 495 N.E.2d 1006.) We find nothing in the record, and the Board makes no reference to anything in the record, that would indicate any misconduct, fraud or bad faith on the part of plaintiffs. As stated above, mere participation in steps (1) and (2) of the promotional process was not evidence of bad faith.
*1244 Finally, the Board contends that this cause should have been dismissed by the trial court on the ground that plaintiffs failed to join the ten candidates who were on the final eligibility list and who were necessary parties to this action. The Board cites the definition of a necessary party as an individual who has a present substantial interest in the matter being litigated and whose interest will be affected by the resolution of the controversy. (Chariot Holdings, Ltd., v. Eastmet Corp. (1st Dist. 1987), 153 Ill.App.3d 50, 106 Ill.Dec. 285, 505 N.E.2d 1076.) However, the Board's contention must fail because, as the trial court correctly ruled, this is an administrative review procedure.
Under section 3-107 of the Administrative Review article of the Code of Civil Procedure (Ill.Rev.Stat.1989, c. 110.3-107), defendants in an action to review any final decision of an administrative agency shall be the agency and all persons who were parties of record to the proceedings before the agency other than plaintiffs. This provision has long been held to define who are indispensable parties in an administrative review action. (Continental Air Transport Co. v. Carpentier (1st Dist.1958), 19 Ill.App.2d 340, 152 N.E.2d 488.) Here the other candidates were not parties to the hearing on plaintiffs' claim before the Board and, hence, they are not necessary parties to the review of that proceeding.
The Board's reliance upon Hauri v. Batzel (2d Dist.1979), 71 Ill.App.3d 164, 27 Ill.Dec. 445, 389 N.E.2d 257, is misplaced. In that case, a police sergeant sought an injunction and declaratory judgment to invalidate the eligibility list for promotion to lieutenant in a municipal police department. His complaint was dismissed for failure to state a cause of action, and the dismissal was affirmed on appeal. The reviewing court observed that the plaintiff's prayer to disqualify the successful candidates could not be considered without joining the officers who would be affected. That case was not an administrative review action and was not subject to section 3-107 of the Code of Civil Procedure. Hence, it does not control the case at bar.
For the reasons stated, we affirm the order of the trial court and remand this cause to the Board for further proceedings in accordance with this decision.
Affirmed and remanded.
SLATER and McCUSKEY, JJ., concur.
