Create configurable 'key photo' attribute type to more easily tag specific images and pull them into reports
Building off the 'framework' we built for signatures (See tickets 3084 and 3122), it would be good for users to be able to designate "key photos" similar to the way we designate signatures.
For example - if at every conflict investigation, the investigator has to take a photo of the claimants national ID card. We should have a way to configure an specific image to be taken for the national ID. This will allow them to configure reports to automatically pull in those key images to certain parts of the report (like we do with signatures). Currently, images other than signatures can be pulled in, but there is no way to tag the images.
Could we let users configure additional “attachment_type” fields like we've done for signatures?
For example - if at every conflict investigation, the investigator has to take a photo of the claimants national ID card. We should have a way to configure an specific image to be taken for the national ID. This will allow them to configure reports to automatically pull in those key images to certain parts of the report (like we do with signatures). Currently, images other than signatures can be pulled in, but there is no way to tag the images.
Could we let users configure additional “attachment_type” fields like we've done for signatures?
Leave a comment
Additional Agreed Tasks:
-add a new query filter for "Contains attachments type: <multi-select box of attachments types>"
This would allow to you filter a query for things like the following, assuming you have these attachment types defined in your CA:
"Has investigator signature"
"Contains National ID card photo"
"Has ID Card photo AND has photo of the person themself"
Some other discussion/details in:
https://app.asana.com/0/1202267415659190/1203415034835965/f
#3235 is a near-duplicate, but also more discussion.
-add a new query filter for "Contains attachments type: <multi-select box of attachments types>"
This would allow to you filter a query for things like the following, assuming you have these attachment types defined in your CA:
"Has investigator signature"
"Contains National ID card photo"
"Has ID Card photo AND has photo of the person themself"
Some other discussion/details in:
https://app.asana.com/0/1202267415659190/1203415034835965/f
#3235 is a near-duplicate, but also more discussion.
I've added the ability to add one or more tags to each waypoint/observation attachment.
In the BIRT reports the Query Attachments dataset have a new attribute (Attachment Tags) Which is a delimited list of all the tags associated with the attachment. It will look something like |tag1|tag2|tag3|. The pipe characters | are important as they allow you to filter specific tags based on the tagid using the BIRT like operator. To filter a specific tag you can add a BIRT filter that is:
row["Attachment Tags"] Like "%|tag|2%"
Image not found...
In the BIRT reports the Query Attachments dataset have a new attribute (Attachment Tags) Which is a delimited list of all the tags associated with the attachment. It will look something like |tag1|tag2|tag3|. The pipe characters | are important as they allow you to filter specific tags based on the tagid using the BIRT like operator. To filter a specific tag you can add a BIRT filter that is:
row["Attachment Tags"] Like "%|tag|2%"
Image not found...
In smart-cs:9267 re: #3284 attachment tags
In smart-cs:9284 re: #3284 query support and data api support
In smart-cs:9288 re: #3284 support for smart mobile tags
Attachment Tags can be associated with a configurable model category similar to the signature types:
Image not found...
These are included in the configurable model exports. The tags are all listed in one section and a link to the tag is included for the nodes that should support them.
To support importing of tag details back into SMART I've updated the photo data to be of the format <hexencodeddata>:<tagkey>:<tagkey>
For Example:
Image not found...
These are included in the configurable model exports. The tags are all listed in one section and a link to the tag is included for the nodes that should support them.
<ConfigurableModel ...>
...
<attachmentTags>
<AttachmentTagType uuid="3611af3e00254722a0ebc02603f560b7" keyid="animal">
<name language_code="en" value="Animal" source="CM"/>
</AttachmentTagType>
<AttachmentTagType uuid="0027b017b94a4499aba3f68daea15c8b" keyid="cat">
<name language_code="en" value="Cat" source="CM"/>
</AttachmentTagType>
</attachmentTags>
...
<node categoryKey="fire" ...>
<attribute attributeKey="threat" .../>
</attribute>
<attribute attributeKey="areaburnedha" .../>
</attribute>
<attachmentTags uuid="3611af3e00254722a0ebc02603f560b7"/>
<attachmentTags uuid="0027b017b94a4499aba3f68daea15c8b"/>
</node>
To support importing of tag details back into SMART I've updated the photo data to be of the format <hexencodeddata>:<tagkey>:<tagkey>
For Example:
{
"geometry": ...,
"properties": {
...
"sighting": {
...
"c:0": "6387e3f039f34227851524a221945a5c",
"e:2263dd5ae7b34a92b59a94300369b182": true,
"e:cd32e2442ade4e64973f0a9e6bc50c19": true,
"e:cfc03b57a608436cb4cf755b34c81687": true,
"e:f0535ecd7ca64d52b7707772006f3c2f": true
"SMART_Photo0:0": "<hexdata>:cat:dog:animal"
...
One of the task items was to:
"-add a new query filter for "Contains attachments type: <multi-select box of attachments types>"
This is quite complex as one attachment can have multiple tags and attachments can belong to observation or waypoints. So if you ask for all attachments of tag type X what do you get back in terms of observation details? If the attachment is associated with a waypoint with multiple observations do you get the all the observations, then you might end up with other attachments associated with these observations that don't have this tag.
What we've done for now is to add a Find By Tag option in the Attachments tab of the query results that allows users to search attachments by tag type. This is not saved and does not affect the query results,exports etc.
To support the Report use case we have added an attachment tag column to the attachment datasets that includes all the tags. Users can add BIRT filters to filter out single tag as described in a comment above.
"-add a new query filter for "Contains attachments type: <multi-select box of attachments types>"
This is quite complex as one attachment can have multiple tags and attachments can belong to observation or waypoints. So if you ask for all attachments of tag type X what do you get back in terms of observation details? If the attachment is associated with a waypoint with multiple observations do you get the all the observations, then you might end up with other attachments associated with these observations that don't have this tag.
What we've done for now is to add a Find By Tag option in the Attachments tab of the query results that allows users to search attachments by tag type. This is not saved and does not affect the query results,exports etc.
To support the Report use case we have added an attachment tag column to the attachment datasets that includes all the tags. Users can add BIRT filters to filter out single tag as described in a comment above.