In the old code, the Attachment supposed its container is Projecdt only. Actually it could be Issue. This commit is to handle when the container is an Issue object