Hello everyone,
I am working on listeners in order to control who can add and delete attachments. I was able to do it for the adding part by using this code on my listener.
List changeItems = event.getChangeLog()?.getRelated("ChildChangeItem") changeItems.each {GenericValue gv -> if (gv["field"] == "Attachment" && gv["newvalue"]) { attachmentIds.add(gv["newvalue"]) } }
But for the deleted attachment part i have no idea. How can i detect if an attachment has been deleted ?
Thank you in advance.
Hello @Anya CHOUKRANE
Welcome to the community.
The ability to create and delete attachments can be managed through the Permission Scheme associated with a project, for Classic projects at least. Is there a reason that methodology doesn't work for your scenario?
Hello, thank you for your response.
My goal is to restrict the permission of adding/deleting attachments based on a custom field value. This is not possible to do from the administration menu. I was able to do it for the adding part (i created a listener on "Issue update" that automatically deletes an added attachment if the condition with the custom field is not met).
I want now to restrict who can delete attachment based on the same custom field value.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.