I am looking for a way to limit the total attachment count or size to say a Defect. I am currently on ALM 12.60 but even up to 15.5 I don't see the option in site admin parameters I am looking for.
I can see in Site Admin I can limit the attachment size but not the total quantity of attachments. Pretty much people have figured out if I limit attachment to 5 MB they simply create as many attachments they want, each less than 5 MB. So realistically there is no attachment size/count limit, just individual attachments restrictions which is not completely helpful.
I noticed in Octane they addressed this with MAX_ATTACHMENT_COUNT_PER_ENTITY which ALM/Quality Center/Test Director does not seem to have after how many years now...unless I am missing something.
Any suggestions would be helpful...I am guessing there is probably a way in workflow to address this if need be but I prefer out of the box solutions so it does not become an issue going forward with upgrades, etc. if possible.
Here's an exmaple for blocking attach file for a bug when it already contains 2 attachments. You will need to consider drag&drop, screen capture etc... if you would like to block all relevant actions.
If ActionName = "attach__file" Then Set objBug = TDConnection.BugFactory.Item(Bug_Fields.Field("BG_BUG_ID").Value) Set objAttachmentFac = objBug.Attachments intCount = objAttachmentFac.NewList("").Count If intCount >2 Then ActionCanExecute =False End If End If