Connect Alerts - Add a patrol source users can see which patrols spawned each alert
Connect Alerts - Add a patrol source users can see which patrols spawned each alert
https://app.asana.com/0/1199928770649381/1200605262283581/f
We would have to change the API and have Justin update his code
More discussion here, this is Task #25 in the list:
https://docs.google.com/document/d/1U2Fu7aaTjWjDrnybrmHCoVxi2mO8FtC4SHQ-MEQv6WA/edit
We need to get feedback on how users setup what value they want to see. Either before the patrol package is created users could do some configuration, adding a patrol/team/leader name etc, or on mobile device only users could enter a value that is seen etc. I think we're leaning to pre-package admin config as that is usually what we've done in the past.
https://app.asana.com/0/1199928770649381/1200605262283581/f
We would have to change the API and have Justin update his code
More discussion here, this is Task #25 in the list:
https://docs.google.com/document/d/1U2Fu7aaTjWjDrnybrmHCoVxi2mO8FtC4SHQ-MEQv6WA/edit
We need to get feedback on how users setup what value they want to see. Either before the patrol package is created users could do some configuration, adding a patrol/team/leader name etc, or on mobile device only users could enter a value that is seen etc. I think we're leaning to pre-package admin config as that is usually what we've done in the past.
Leave a comment
-User council has approved Emily's suggested approach:
add another optional field to the Alert model
called something like "Field Identifier". If provided, this identifier
would show on the Connect map in the popup and perhaps we could have
an option for labelling the points on the map with this identifier as well..
Configuration of how the identifier would be populated would be made in
the SMART Mobile Package setup in the same place where users currently
configure "Position Updates". I was thinking we could add a text area
that would allow people to configure how the identifier is generated
based on patrol metadata fields (similar to the Patrol ID generation).
So users could specify something like:
"Patrol Team: {patrol_leader}({patrol start})"
And the resulting identifier would be be:
"Patrol Team: Bob Smith(July 17, 2023)"
-Justin has confirmed that approach should work on his side as well, he will implement something once we get a test server with this feature on it.
add another optional field to the Alert model
called something like "Field Identifier". If provided, this identifier
would show on the Connect map in the popup and perhaps we could have
an option for labelling the points on the map with this identifier as well..
Configuration of how the identifier would be populated would be made in
the SMART Mobile Package setup in the same place where users currently
configure "Position Updates". I was thinking we could add a text area
that would allow people to configure how the identifier is generated
based on patrol metadata fields (similar to the Patrol ID generation).
So users could specify something like:
"Patrol Team: {patrol_leader}({patrol start})"
And the resulting identifier would be be:
"Patrol Team: Bob Smith(July 17, 2023)"
-Justin has confirmed that approach should work on his side as well, he will implement something once we get a test server with this feature on it.
To the alert definitions in the ct_profile.json package I've added an options FIELDIDENTIFIER value which contains the string with metadata tokens in { }:
{
"WAYPOINT_TIMER_TYPE": "TIME",
...
"POSITION_UPDATES": {
"API_KEY": "5e0da413-6da0-4782-8f84-ee5476c6a4f6",
"METADATA": {
"TYPEUUID": "a5d9923f-973a-491e-b6f4-2999cb55f2cd",
"FIELDIDENTIFIER": "{SMART_Station} - {SMART_Leader} {SMART_PatrolTransport}{SMART_PatrolStartDate}",
"CAUUID": "851a5f98-852a-4579-989b-86e353bddd06",
"LEVEL": 1
},
"FREQUENCY_MIN": 10,
"URL": "https:\/\/connect8.refractions.net:8443\/server\/noa\/cybertracker\/alert\/"
},
...
"ALERTS": [{
"API_KEY": "5e0da413-6da0-4782-8f84-ee5476c6a4f6",
"CMATTRIBUTE_UUID": "7717c10d-9ff1-4ac6-b7f5-c7c4492d506e",
"CMATTRIBUTE_TREENODE_UUID": "5ccc918e-aff9-4c7e-ba84-6fbb43c2c82c",
"METADATA": {
"TYPEUUID": "9b983541-1f07-46a3-a1e7-fe80d1ed17c4",
"FIELDIDENTIFIER": "{SMART_Station} - {SMART_Leader} {SMART_PatrolTransport}{SMART_PatrolStartDate}",
"CAUUID": "851a5f98-852a-4579-989b-86e353bddd06",
"LEVEL": 1
},
"URL": "https:\/\/connect8.refractions.net:8443\/server\/noa\/cybertracker\/alert\/",
"CMNODE_UUID": "3ef9908d-aedc-4362-8606-607fa8a18b4d"
}, {
"API_KEY": "5e0da413-6da0-4782-8f84-ee5476c6a4f6",
"CMATTRIBUTE_UUID": "7717c10d-9ff1-4ac6-b7f5-c7c4492d506e",
"CMATTRIBUTE_TREENODE_UUID": "005668d9-846b-4e0c-b92e-73afbc23c237",
"METADATA": {
"TYPEUUID": "a5d9923f-973a-491e-b6f4-2999cb55f2cd",
"FIELDIDENTIFIER": "{SMART_Station} - {SMART_Leader} {SMART_PatrolTransport}{SMART_PatrolStartDate}",
"CAUUID": "851a5f98-852a-4579-989b-86e353bddd06",
"LEVEL": 1
},
"URL": "https:\/\/connect8.refractions.net:8443\/server\/noa\/cybertracker\/alert\/",
"CMNODE_UUID": "3ef9908d-aedc-4362-8606-607fa8a18b4d"
}
...
}
On connect you can supply or edit a Field Identifier as part the Alert User Interface:
Image not found...
Image not found...
If supplied it appears at the top of the popup:
Image not found...
If not supplied not shown in popup:
Image not found...
For using the API to create alerts you must use the key "fieldIdentifier" (case insensitive).
The API to get alerts returns this as "fieldIdentifer":
Image not found...
Image not found...
Image not found...
If supplied it appears at the top of the popup:
Image not found...
If not supplied not shown in popup:
Image not found...
For using the API to create alerts you must use the key "fieldIdentifier" (case insensitive).
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": ["1", "2"]
},
"properties": {
"deviceId": "0",
"id": "0",
"latitude": "2",
"longitude": "1",
"altitude": 0,
"accuracy": 0,
"caUuid": "8f7fbe1b-201a-4ef4-bda8-14f5581e65ce",
"level": "1",
"description": "Test Alert",
"fieldIdentifier": "Patrol - 01",
"typeUuid": "18f5a7f8-d160-40e2-982d-9a67c4f8e33e",
"sighting": {}
}
}]
}
The API to get alerts returns this as "fieldIdentifer":
Image not found...
In smart-cs:9088 re: #3355
Justin:
As mentioned above the ALERTS section in the ct_profile.json will now (optionally) include a FIELDIDENTIFIER:
The idea is the text in { } is replaced by the metadata value selected by the user (or the default value if none is selected). The values inside the { } should match one of the metadata fields defined in the patrol_metadata.json. In the desktop app I've listed the following as valid values:
Patrol Packages: {SMART_Leader}, {SMART_PatrolTransport}, {SMART_Mandate}, {SMART_Station}, {SMART_Team}, {SMART_PatrolStartDate}, {SMART_PatrolStartTime}
Survey Packages: {SMART_Leader}, {SMART_PatrolStartDate}, {SMART_PatrolStartTime}
The configuration for this is on the 'Connect' Tab of the package configuration:
Image not found...
As mentioned above the ALERTS section in the ct_profile.json will now (optionally) include a FIELDIDENTIFIER:
"ALERTS": [
{
"API_KEY": "b8c6cd31-0355-4010-a29f-8941acfe90fa",
"METADATA": {
"TYPEUUID": "a5d9923f-973a-491e-b6f4-2999cb55f2cd",
"CAUUID": "a60e4d95-0c9b-4e00-b2d3-b99079e559ad",
"LEVEL": 1,
"FIELDIDENTIFIER": "{SMART_Leader}_a_{SMART_PatrolTransport}_b_{SMART_Mandate}_c_{SMART_Station}_d_{SMART_Team}_e_{SMART_PatrolStartDate}_f_{SMART_PatrolStartTime}"
},
"URL": "https:\\/\\/connect8.refractions.net:8443\\/server\\/noa\\/cybertracker\\/alert\\/",
"CMNODE_UUID": "f2bd2a26-4b13-4ba9-bb7c-4fd76e48158a"
}
],
The idea is the text in { } is replaced by the metadata value selected by the user (or the default value if none is selected). The values inside the { } should match one of the metadata fields defined in the patrol_metadata.json. In the desktop app I've listed the following as valid values:
Patrol Packages: {SMART_Leader}, {SMART_PatrolTransport}, {SMART_Mandate}, {SMART_Station}, {SMART_Team}, {SMART_PatrolStartDate}, {SMART_PatrolStartTime}
Survey Packages: {SMART_Leader}, {SMART_PatrolStartDate}, {SMART_PatrolStartTime}
The configuration for this is on the 'Connect' Tab of the package configuration:
Image not found...