Let \({\mathcal {B}}(H)\) be the \(C^{*}\) -algebra of all bounded linear operators on a complex Hilbert space H. For \(A,B\in {\mathcal {B}}(H)\) , define the basic elementary operator \(M_{A,B}\) by \(\begin{aligned} M_{A,B}(X)=AXB, \, (X\in {\mathcal {B}}(H)). \end{aligned}\) If J is a symmetric norm ideal of \({\mathcal {B}}(H)\) , we denote \(M_{J,A,B}\) the restriction of \(M_{A,B}\) to J. In this paper, we study the generalized Daugavet equation \(\begin{aligned} \Vert I+M_{J,A,B}+M_{J,C,D}\Vert =1+\Vert A\Vert \Vert B\Vert +\Vert C\Vert \Vert D\Vert , \end{aligned}\) here I stands for the identity operator on H. In particular, we give necessary and sufficient conditions on positive operators A and B to satisfy this equality in the special case where J is the Hilbert-Schmidt ideal of operators in \({\mathcal {B}}(H)\) .