I have this sentence
Persons performing tasks which affect product quality should have appropriate skill and knowledge.
in which I am not sure whether who or which is grammatically correct.
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
It is the task which directly affects product quality, not the person; therefore, the correct word would be which.
By the way, affect should be used in your sample sentence, not effect.
From the Oxford Dictionaries, effect (as a verb) means:
verb [with object]: cause (something) to happen; bring about
The prime minister effected many policy changes.
While affect means:
verb [with object]: have an effect on; make a difference to
The dampness began to affect my health.
I assume that you intend the relative pronoun to refer to tasks. In that case, the relative clause which follows it can be introduced by either which or that, but not by who. Who is used only when the antecedent is a person.
The relative clause is of the defining type, which some think can be introduced only by that and not by which, but they are wrong.