## Issue Tracker Report Script "Issues-with-image-file-attachments"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=issue
##title=Issues with image file attachments
##
# 0. content types
cts = ('image/pjpeg','image/jpeg','image/gif','image/png',
                  'image/x-png')

# 1. check if the issue has an image file attachment
for file in issue.objectValues('File'):
    if file.content_type in cts:
        return True

for thread in issue.ListThreads():
    for file in thread.objectValues('File'):
        if file.content_type in cts: 
            return True
    


# default thing to do is to NOT include the issue
return False
