•  
      request #19204 REST representation of a burndown is incorrect when an artifact does not have a start date or a time frame semantic
    Infos
    #19204
    Thomas Gerbet (tgerbet)
    2021-01-20 15:39
    2021-01-19 18:20
    20773
    Details
    REST representation of a burndown is incorrect when an artifact does not have a start date or a time frame semantic

    The REST representation (and the internal APIs) are incorrect when the field used in the semantic are not populated in the artifact or when there is no semantic at all.

    Depending on the case you can end up in a situation where the start date is set to 1970, some examples:

    {
          "field_id": 5019,
          "type": "burndown",
          "label": "burndown",
          "value": {
            "start_date": "1970-01-01T01:00:00+01:00",
            "duration": 0,
            "capacity": null,
            "points": [],
            "is_under_calculation": false,
            "opening_days": [
              1,
              2,
              3,
              4,
              5
            ],
            "points_with_date": []
          }
        }

    The root cause seems to be located in Tuleap\Tracker\Semantic\Timeframe\TimeframeBuilder::buildTimePeriodWithoutWeekendForArtifactForREST which is also a source of issues for the ongoing story #18408.

    Trackers
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-01-20
    Attachments
    Empty
    References
    Referencing request #19204

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2021-01-20 12:31
    The fact it gets set to the current date is by design. Anyway, when no duration is provided one should not be arbitrarily chosen.

    Issue is in fact located in TimePeriodWithoutWeekEnd::buildFromDuration.

    See gerrit #21459.

    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Status changed from Under implementation to Under review