Hi all,
I've got a pretty complex question. So here is a little bit of context:
In an automation rule I do a web request to Tempo and get a JSON back with list of worklogs. In some of these worklogs I do have a work attribute TFT. I want to sum all timeSpentSeconds values for all worklogs with the TFT attribute.
I've tried a regex (which does not work for me), a branch (I do get the values ,but I can't sum them, at least when I leave the branch, my sum variable is 0).
I know there are some automation wizards out there, so my hopes are on you!
Here is (a part of ) the JSON:
{
"self": "https://api.tempo.io/4/worklogs/user/$accountid?from=2024-01-01&to=2024-12-31&offset=0&limit=5000",
"metadata": {
"count": 498,
"offset": 0,
"limit": 5000
},
"results": [
{
"self": "https://api.tempo.io/4/worklogs/27386",
"tempoWorklogId": 27386,
"issue": {
"self": "https://$site.atlassian.net/rest/api/2/issue/90340",
"id": 90340
},
"timeSpentSeconds": 7200,
"billableSeconds": 0,
"startDate": "2024-02-04",
"startTime": "09:00:00",
"description": "Week 5",
"createdAt": "2024-01-31T16:08:45Z",
"updatedAt": "2024-01-31T16:08:57Z",
"author": {
"self": "https://$site.atlassian.net/rest/api/2/user?accountId=$accountid",
"accountId": "$accountid"
},
"attributes": {
"self": "https://api.tempo.io/4/worklogs/27386/work-attribute-values",
"values": [
{
"key": "_Account_",
"value": "$Account"
}, {
"key": "_TFT_",
"value": "true"
}
]}
}, {
"self": "https://api.tempo.io/4/worklogs/27303",
"tempoWorklogId": 27303,
"issue": {
"self": "https://$site.atlassian.net/rest/api/2/issue/90194",
"id": 90194
},
"timeSpentSeconds": 28800,
"billableSeconds": 28800,
"startDate": "2024-02-02",
"startTime": "09:00:00",
"description": "Part time day off",
"createdAt": "2024-01-30T15:03:12Z",
"updatedAt": "2024-04-22T15:18:03Z",
"author": {
"self": "https://$site.atlassian.net/rest/api/2/user?accountId=$accountid",
"accountId": "$accountid"
},
"attributes": {
"self": "https://api.tempo.io/4/worklogs/27303/work-attribute-values",
"values": [ {
"key": "_Account_",
"value": "$Account"
} ]
} }
]}