While voters here were wrestling with the question of whether to elect their first Republican mayor in 52 years or the first black mayor ever, a federal judge came down with an order that may have more impact on the city than either Bernard E. Epton or Harold Washington. Judge Nicholas Bua spelled out specific steps the city of Chicago and other local jurisdictions will have to take to end the old custom of patronage hiring.

This case started 14 years ago when Michael Shakman, a Chicago lawyer who was president of the Independent Voters of Illinois, a liberal Democratic organization, filed suit challenging the patronage system that was one of the major props of the city Democratic organization then commanded by Mayor Richard J. Daley. He carried his case to the Supreme Court, where the principle was affirmed that firing a public employee for refusing to work for the political party that "sponsored" him or her for the job was a violation of the worker's rights.

Under the mandate of the district court, the city and county governments spelled out specific guarantees against political firings. It was not until 1979, however, that Bua ruled that the same sort of procedures must apply to hiring. And only last week did he enter the order spelling out the new rules on the hiring side.

They are quite sweeping. No one can be hired for most jobs (a few "political" positions will remain exempt) unless the notice of vacancy has been posted for at least two weeks. Wide and recurrent publicity must be given to the new hiring system. All those who ask must be given notice of new job listings. Government agencies must report annually to the judge how they are carrying out the decree.

Even with all these safeguads, it remains to be seen how effective the latest decision will be. The previous rulings did not end patronage. And there is nothing even in the latest order that prevents a ward committeeman from sending a letter of recommendation for a friend. Some of the pols here said they think they will still be able to do business.

There are plenty of repellent examples of the abuse of patronage. On WBBM-TV last week, political commentator Walter Jacobson displayed a sequence of remarkable still photographs, showing a crew of city sanitation workers, picking up and loading onto a city sanitation truck a number of benches and posters bearing the name of a candidate who had the temerity to challenge the incumbent machine alderman in his ward.

But is the remedy for such a system to be found through the agency of the federal courts? Or is it something the voters themselves should decide? Both Epton and Washington declared themselves to be enemies of the old patronage system. It is possible that they meant it.

But it is also possible, as some historians of the Daley machine argue, that the patronage system served a useful function for the city--as well as for the machine. Milton Rakove, a professor at the University of Illinois-Chicago Circle, has written that Daley "took control of the city's administrative bureaucracy and recruited a group of first-rate professional administrators to run the city departments that deal with basic public services. . . . The administrators, on their side, were expected to recognize the realities of politics in Chicago and to be sensitive to the built-in relationships among the city government, the ward organizations and the voters whom the city government and the ward organizations had to service together."

Rakove said that system kept voters "moderately satisfied and quiescent"--two things they definitely were not as this bitter campaign wound to its finish.

It may be that the new mayor will end that old system. But if not, one has to wonder about the wisdom of the courts trying to make that decision on their own.