Added toxic substance to cup - it was an unpleasant assignment (8,7)
I believe the answer is:
poisoned chalice
'assignment' is the definition.
(I have seen 'Problematic assignment' mean 'poisoned chalice' so perhaps 'assignment' could also mean 'poisoned chalice')
'added toxic substance to cup' is the wordplay.
'added toxic substance' becomes 'poisoned' (I can't explain this - if you can you should give a lot more credence to this answer).
'to cup' becomes 'chalice' (chalice is a kind of cup).
'poisoned'+'chalice'='POISONED CHALICE'
'it was an unpleasant' acts as a link.
I am not very happy about this link. Some or all of it may be part of another bit of the clue.
Can you help me to learn more?
(Other definitions for poisoned chalice that I've seen before include "that was the death of Gertrude" , "This is likely to cause trouble" , "may be a curse in disguise" , "Source of trouble" , "undoing?" .)