  We study the $J/\psi \pi$ and $D\bar{D}^*$ coupled-channel system within a
covariant framework. The $J/\psi \pi$ and $D\bar{D}^*$ invariant-mass
distributions measured at 4.23~GeV and 4.26~GeV by BESIII and the finite-volume
energy levels from recent lattice QCD simulations are simultaneously fitted.
Phase shifts and inelasticities of the $J/\psi \pi$ and $D\bar{D}^*$ scattering
are predicted using the resulting amplitudes. Poles corresponding to the
$Z_c(3900)$ state are found in the complex energy plane and their couplings
with $J/\psi \pi$ and $D\bar{D}^*$ are determined. Our results indicate that
the current lattice data do not preclude the existence of a physical
$Z_c(3900)$ state.
