Your platform will be unavailable on the 13th of November 2024 from 9am to 12pm (Paris time) for maintenance operations

    •  
      request #40080 JavaScript error when switching from Cross-tracker search expert mode to default
    Infos
    #40080
    Joris MASSON (jmasson)
    2024-10-17 11:55
    2024-10-16 16:48
    41700
    Details
    JavaScript error when switching from Cross-tracker search expert mode to default

    Given a widget with a report saved in expert mode (with a working query)
    when you edit this widget, switch to Default mode, select a tracker, edit the query for default mode, and hit "Search" button
    then the widget will show the table of results, but there is a JavaScript error in the console:

    cross-tracker-MLcMrbRV.js:19393 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'find')
        at findArtifactSelectable (cross-tracker-MLcMrbRV.js:19393:14)
        at Object.mapReportToArtifactsTable (cross-tracker-MLcMrbRV.js:19520:14)
    

    This error is due to the widget making two parallel requests to the API, once with default mode, and once with expert mode. Since the query can only be valid in one of the modes, one of the requests will fail.

    Technical details

    This is due to the design of the widget: it has two "artifact tables" that watch the report state. Only one is supposed to be mounted at a given time, but there is an interval after changing the widget state where both can be mounted at the same time, and trigger a request by their watch.

    Cross tracker search
    16.0
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2024-10-17
    Attachments
    Empty
    References
    Referencing request #40080
    Referenced by request #40080

    Artifact Tracker v5

    rel #37899 16.1

    Follow-ups