davinogueiradev opened a new issue, #8558:
URL: https://github.com/apache/incubator-devlake/issues/8558

   ### Bug Description
   
   The Jira plugin fails to collect epics when the `description` field contains 
rich text (Atlassian Document Format) instead of a plain string. This leads to 
a JSON unmarshaling error during data collection, causing the pipeline to fail.
   
   ### Root Cause
   
   The Go struct `apiv2models.Issue` in 
`backend/plugins/jira/tasks/apiv2models/issue.go` defines the `Description` 
field as a `string`. However, the Jira API returns a complex JSON object for 
rich text fields, causing a type mismatch during JSON unmarshaling.
   
   ### Stack Trace
   ```
   attached stack trace -- stack trace: | 
github.com/apache/incubator-devlake/server/services.runPipeline | 
/app/server/services/pipeline_runner.go:79 | [...repeated from below...] Wraps: 
(2) Error running pipeline 3. Wraps: (3) attached stack trace -- stack trace: | 
github.com/apache/incubator-devlake/server/services.RunTasksStandalone | 
/app/server/services/task.go:217 | 
github.com/apache/incubator-devlake/server/services.(*pipelineRunner).runPipelineStandalone.func1
 | /app/server/services/pipeline_runner.go:42 | 
github.com/apache/incubator-devlake/core/runner.runPipelineTasks | 
/app/core/runner/run_pipeline.go:90 | 
github.com/apache/incubator-devlake/core/runner.RunPipeline | 
/app/core/runner/run_pipeline.go:54 | 
github.com/apache/incubator-devlake/server/services.(*pipelineRunner).runPipelineStandalone
 | /app/server/services/pipeline_runner.go:38 | 
github.com/apache/incubator-devlake/server/services.runPipeline | 
/app/server/services/pipeline_runner.go:76 | github.com/apache/incu
 bator-devlake/server/services.RunPipelineInQueue.func1 | 
/app/server/services/pipeline.go:358 | runtime.goexit | 
/usr/local/go/src/runtime/asm_arm64.s:1172 Wraps: (4) attached stack trace | -- 
stack trace: | | 
github.com/apache/incubator-devlake/server/services.RunTasksStandalone.func1 | 
| /app/server/services/task.go:189 | Wraps: (2) Error running task 15. | Wraps: 
(3) attached stack trace | -- stack trace: | | 
github.com/apache/incubator-devlake/core/runner.RunPluginSubTasks | | 
/app/core/runner/run_task.go:333 | | [...repeated from below...] | Wraps: (4) 
subtask extractEpics ended unexpectedly | Wraps: (5) attached stack trace | -- 
stack trace: | | 
github.com/apache/incubator-devlake/helpers/pluginhelper/api.(*StatefulApiExtractor[...]).Execute
 | | /app/helpers/pluginhelper/api/api_extractor_stateful.go:159 | | 
github.com/apache/incubator-devlake/plugins/jira/tasks.ExtractEpics | | 
/app/plugins/jira/tasks/epic_extractor.go:96 | | 
github.com/apache/incubator-devlake/core/runner.ru
 nSubtask | | /app/core/runner/run_task.go:425 | | 
github.com/apache/incubator-devlake/core/runner.RunPluginSubTasks | | 
/app/core/runner/run_task.go:330 | | 
github.com/apache/incubator-devlake/core/runner.RunPluginTask | | 
/app/core/runner/run_task.go:165 | | 
github.com/apache/incubator-devlake/core/runner.RunTask | | 
/app/core/runner/run_task.go:139 | | 
github.com/apache/incubator-devlake/server/services.runTaskStandalone | | 
/app/server/services/task_runner.go:114 | | 
github.com/apache/incubator-devlake/server/services.RunTasksStandalone.func1 | 
| /app/server/services/task.go:187 | | runtime.goexit | | 
/usr/local/go/src/runtime/asm_arm64.s:1172 | Wraps: (6) json: cannot unmarshal 
object into Go struct field .fields.description of type string | Wraps: (7) 
json: cannot unmarshal object into Go struct field .fields.description of type 
string | Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) 
*withstack.withStack (4) *errutil.withPrefix (5) *withstack.withStack (6) *e
 rrutil.withPrefix (7) *json.UnmarshalTypeError Error types: (1) 
*withstack.withStack (2) *errutil.withPrefix (3) *withstack.withStack (4) 
*errutil.leafError
   ```


-- 
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