The plot revolves around Wojciehowicz being forced to spend one week each month on uniform patrol duty because he is the only Detective Third Grade in the department, but in his previous appearance, Dietrich identified himself as a Detective Third Grade as well. Thus, Either Dietrich or Wojo could have been assigned to uniform duty. Although, the order is for Detective Third Grade personnel from each precinct to pull uniformed duty. Dietrich is on temporary assignment at this point and not officially part of the 12th precinct, and thus would technically be exempt from the order.
Wojciehowicz is a Detective 3rd grade. He would be issued a Detective's gold shield with a sunburst pattern. That shield would be worn when the Detective is in uniform, but Wojciehowicz is seen wearing a Police Officer's silver shield when in uniform. Whether in uniform or not, the Detective's rank doesn't change.