•  
      request #21401 Duration field can be a float but Roadmap do not take it into account
    Infos
    #21401
    Manuel Vacelet (vaceletm)
    2021-05-25 12:16
    2021-05-25 11:09
    22989
    Details
    Duration field can be a float but Roadmap do not take it into account

    I got the issue by adding a child from a tracker with a duration field as a float/ When I expand the children, Error 500:

    2021/05/25 09:04:32 [error] 77#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Return value of Tuleap\Tracker\Semantic\Timeframe\TimeframeArtifactFieldsValueRetriever::getDurationFieldValue() must be of the type int or null, float returned in /usr/share/tuleap/plugins/tracker/include/Tracker/Semantic/Timeframe/TimeframeArtifactFieldsValueRetriever.php:72
    Stack trace:
    #0 /usr/share/tuleap/plugins/tracker/include/Tracker/Semantic/Timeframe/TimeframeWithDuration.php(145): Tuleap\Tracker\Semantic\Timeframe\TimeframeArtifactFieldsValueRetriever::getDurationFieldValue()
    #1 /usr/share/tuleap/plugins/roadmap/include/Roadmap/REST/v1/TaskRepresentationBuilderForTracker.php(75): Tuleap\Tracker\Semantic\Timeframe\TimeframeWithDuration->buildTimePeriodWithoutWeekendForArtifactForREST()
    #2 /usr/share/tuleap/plugins/roadmap/include/Roadmap/REST/v1/SubtasksRetriever.php(91): Tuleap\Roadmap\REST\v1\TaskRepresentationBuilderForTracker->buildRepresentation()
    #3 /usr/share/tuleap/plugins/roadmap/include/Roadmap/REST/v1/TasksResource.php(114): T" while reading response header from upstream, client: 172.20.0.3, server: tuleap-devel.enalean.com, request: "GET /api/roadmap_tasks/821/subtasks?limit=100&offset=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "tuleap-devel.enalean.com", referrer: "https://tuleap-devel.enalean.com/projects/demo-tuleap-12-4/?dashboard_id=134"
    
    Roadmap
    development
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2021-05-25
    Attachments
    Empty
    References
    Referencing request #21401
    Referenced by request #21401

    Artifact Tracker v5

    rel #20930 12.9

    Follow-ups