I've been trying to implement author name categories in BibLaTeX based on this answer while using biber. However, I don't seem to be able to catch the author name using \iffieldequalstr in \AtEveryBibItem:
\DeclareBibliographyCategory{authorSmith}
\AtEveryBibitem{\iffieldequalstr{author}{Smith, John}{\addtocategory{authorSmith}{\thefield{entrykey}}{}}}
When I issue the \printbibliography[category=authorSmith] command, nothing is printed from the bibliography.
Here's a MWE showing the issue and all the name combinations I could think of, and how it doesn't happen when with year:
mwe.tex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[sorting=none]{biblatex}
\addbibresource{mwe.bib}
\DeclareBibliographyCategory{authorSmith}
\AtEveryBibitem{\iffieldequalstr{author}{Smith, John}{\addtocategory{authorSmith}{\thefield{entrykey}}{}}}
\AtEveryBibitem{\iffieldequalstr{author}{Smith,John}{\addtocategory{authorSmith}{\thefield{entrykey}}{}}}
\AtEveryBibitem{\iffieldequalstr{author}{SmithJohn}{\addtocategory{authorSmith}{\thefield{entrykey}}{}}}
\AtEveryBibitem{\iffieldequalstr{author}{JohnSmith}{\addtocategory{authorSmith}{\thefield{entrykey}}{}}}
\AtEveryBibitem{\iffieldequalstr{author}{John Smith}{\addtocategory{authorSmith}{\thefield{entrykey}}{}}}
\DeclareBibliographyCategory{year1984}
\AtEveryBibitem{\iffieldequalstr{year}{1984}{\addtocategory{year1984}{\thefield{entrykey}}{}}}
\begin{document}
\nocite{*}
\printbibliography
\section*{Sorted by Author}
\printbibliography[category=authorSmith]
\section*{Sorted by Year}
\printbibliography[category=year1984]
\end{document}
mwe.bib
@article{smith:TestPaper,
addendum = {This should show up},
author = {Smith, John},
journal = {Test Journal},
year = {1984},
title = {Test Paper}
}
Does anyone know how I can catch the author's name? I have similar issues with source maps.

