The Human Resources department in the town council at first discovered that the two men had not been to work for a single day in 2015 or so far in 2016 when they were going through their records.
But on further inspection they discovered that the period stretched much further back than they could have imagined.
"Two representatives of the General Confederation of Labour union (the CGT) could have gone years without coming to work; according to a written statement by the men themselves this situation could date back 15 years," the town hall of Jerez de la Frontera wrote in a statement, published on its website.
The CGT union, to which both men belong, has defended its unionists, arguing that they were simply taking off their "accumulated days" and those of other employees, which can be shared.
It argued that their absence was part of a “tacit agreement” with the various town councils over the 15 year period.
After being questioned by Human Resources, one of the men returned to work, while the other produced a written statement explaining that he had accumulated the union hours of his colleagues.
The town hall, however, said this was "insufficient to free him from work for the rest of the year, which was his intention".
The two men are not the only workers exposed as having worked much fewer hours than they should have.
The town hall claims that it also discovered that several workers from the SIP union (local police) who had worked fewer than 100 days in 2015. One member worked only 47 days in 2015, while another worked 66.
In February 2016 it was discovered that a civil servant has failed to turn up to work for six years but had continued to collect his salary each month when no one noticed his absence.