jvgr019 opened a new issue, #8906:
URL: https://github.com/apache/devlake/issues/8906

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   When closing an incident via webhook, the incident does not appear to be 
properly marked as resolved in the database.
   [Failed deployment recovery time needs resolved_date to calculate 
metric](https://devlake.apache.org/docs/Metrics/FailedDeploymentRecoveryTime)
   
   ### What do you expect to happen
   
   When an incident is resolved via webhook, FDRT should reflect the correct 
recovery time
   
   ### How to reproduce
   
   - Create an incident in DevLake by webhook
   
   `curl --location 
'http://localhost:4000/api/rest/plugins/webhook/connections/3/issues' \
   --header 'Content-Type: application/json' \
   --header 'Authorization: Bearer XXXXXXXX' \
   --data '{
         "issueKey":"202606031000",
         "title":"Issue from webhook",
         "type":"INCIDENT",
         "originalStatus":"CREATED",
         "status":"IN_PROGRESS",
         "createdDate":"2026-06-03T08:00:00+00:00"
       }'`
   
   - Look at incidents table how record is created with created_date field 
filled with createdDate from body
   
   <img width="313" height="74" alt="Image" 
src="https://github.com/user-attachments/assets/7b2cc8d8-5032-49c2-9f4e-f26064aa10cb";
 />
   
   - Close the incident
   `curl --location --request POST 
'http://localhost:4000/api/rest/plugins/webhook/connections/3/issue/202606031000/close'
 \
   --header 'Authorization: Bearer XXXXXXXX'`
   - Response is Ok 200
   `{
       "code": 0,
       "success": true,
       "message": "success",
       "causes": null,
       "data": null
   }`
   
   - Look at incidents table how record created previously not fill 
resolution_date
   
   <img width="313" height="74" alt="Image" 
src="https://github.com/user-attachments/assets/3e1b8e4b-284c-49a7-b3f0-32a91236c5c0";
 />
   
   - At Dora dashboard FDRT show no data
   
   <img width="475" height="233" alt="Image" 
src="https://github.com/user-attachments/assets/3bad42c8-1c7a-4d14-8ee1-7706c672564d";
 />
   
   - Update incident resolution_date field into database
   `update incidents set resolution_date = '2026-06-03 09:30:00' where id = 
'webhook:3:202606031000'`
   - At Dora dashboard FDRT data is shown
   
   <img width="462" height="179" alt="Image" 
src="https://github.com/user-attachments/assets/83044aff-dfb9-405c-853e-50c965613496";
 />
   
   
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   v1.0.3-beta12@1d21f19
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to