[Tex/LaTex] EID bib entry causes duplicate page numbers in citation with biblatex

biblatexbibtexciting

ADS paper service usually provides the EID entry as well as the pages entry in their bibtex files. Both entries generally contain the page number of an article. Usually this doesn't seem to cause any issues. However, when using \fullcite{} from biblatex both entries are printed resulting in duplicate page numbers in the citation. Is there a way to suppress printing the EID with \fullcite?

Full example:

\documentclass{article}
\usepackage[backend=biber,]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@ARTICLE{eisenstein2011,
    author = {{Eisenstein}, D.~J. and {Weinberg}, D.~H. and {Agol}, E. and
    {Aihara}, H. and {Allende Prieto}, C. and {Anderson}, S.~F. and
    {Arns}, J.~A. and {Aubourg}, {\'E}. and {Bailey}, S. and
    {Balbinot}, E. and et al.},
    title = "{SDSS-III: Massive Spectroscopic Surveys of the Distant Universe,
    the Milky Way, and Extra-Solar Planetary Systems}",
    journal = {Astrophysical Journal},
    archivePrefix = "arXiv",
    eprint = {1101.1529},
    primaryClass = "astro-ph.IM",
    keywords = {cosmology: observations, Galaxy: evolution, planets and
    satellites: detection, surveys},
    year = 2011,
    month = sep,
    volume = 142,
    eid = {72},
    pages = {72},
    doi = {10.1088/0004-6256/142/3/72},
    adsurl = {http://adsabs.harvard.edu/abs/2011AJ....142...72E},
    adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents}

\begin{document}
\fullcite{eisenstein2011}

\end{document}

Best Answer

Articles like this are a bit of a grey area, I would say that in this case only eid = {72} is correct and pages = {72} is a bit misleading, but you could feel the exact opposite.

Anyway, you can get rid of the eid in citations with

\AtEveryCitekey{\clearfield{eid}}

in the bibliography that is

\AtEveryBibitem{\clearfield{eid}}

To get rid of the field entirely you can use Biber

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldset=eid, null]
    }
  }
}

With

\AtEveryCitekey{\iffieldsequal{eid}{pages}{\clearfield{pages}}{}}
\AtEveryBibitem{\iffieldsequal{eid}{pages}{\clearfield{pages}}{}}

we delete the pages only if the content of the pages and eid field coincide.