View Issue Details

IDProjectCategoryView StatusLast Update
0034369mantisbtapi restpublic2024-03-30 02:09
Reporteracoder2020 Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status acknowledgedResolutionopen 
Product Version2.26.0 
Summary0034369: Allow post-dated Created dates when submitting Issues via REST API
Description

Presently there is not a way to submit the date an issue was created when posting an issue via REST API.

Allow submission of issues with a date_submitted field that can be in the past.

This will make importing data from another (older) issue tracker easier. It is difficult to follow issues when they have a modern creation date but where actually created (in the old issue tracking software) 10 years ago.

Steps To Reproduce

Submit this JSON:

            "summary" => $summary,
            "date_submitted" => '2020-01-01 12:23:34',
            "description" => $description,
            'project' => [
                'id' => $mantis_project_id
            ],
            'handler' => [
                'name' => $owner
            ],
            'category' => [
                'id' => $mantis_category_id,
                'name' => $component
            ],
            'view_state' => [
                'id' => $mantis_view_state
            ],
            'priority' => [
                'id' => getMantisPriority($priority)
            ],
            'severity' => [
                'id' => getMantisSeverity($severity)
            ],
            'reproducibility' => [
                'name' => 'always'
            ],
            'sticky' => 'sticky',
            'reporter' => [
                'id' => $reporter_id
            ]

The date_submitted field is ignored.

TagsNo tags attached.

Relationships

related to 0034368 acknowledged Accept timestamps (including historical/past dates) when posting notes via REST API 

Activities

acoder2020

acoder2020

2024-03-25 16:11

reporter   ~0068710

This should also work when updating an existing issue via REST API.

dregad

dregad

2024-03-26 04:14

developer   ~0068711

@vboctor your opinion on this would be appreciated

acoder2020

acoder2020

2024-03-26 09:05

reporter   ~0068717

As with 0034368, leaving date_submitted blank or not adding it to JSON would work the way it does now - it would default to the current datetime.

Additionally, if date_submitted were invalid, it would preferably error out and not post (or if you don't check dates anywhere else just let it add as it was submitted)

vboctor

vboctor

2024-03-30 02:09

manager   ~0068755

See my thoughts at 0034368:0068754