View Issue Details

IDProjectCategoryView StatusLast Update
0011280mantisbtapi soappublic2012-03-26 06:15
Reportercoyttl Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version1.1.8 
Summary0011280: mc_issue_add function not honoring "date_Submitted" field.
Description

Possibly related to 0011274, the "date_submitted" field of the IssueData is not honored upon creation of a new incident through the

mantisConnect.mc_issue_add(IssueData)

call.

Additional Information

This could be debated whether or not it's an actual 'issue' or not, because people could claim that even thought the "date_submitted" is set to yesterday, it was literally 'created' today during the remote import. I only opened this because, as a developer working on a side-project, I had expected it to be honored, and was surprised that it wasn't.

TagsNo tags attached.

Relationships

related to 0011274 acknowledged mc_issue_note_add function not honoring CreationDate 
related to 0013677 new How to modify report issue date and time after submit the case ? 

Activities

vboctor

vboctor

2009-12-11 10:38

manager   ~0023894

On the one hand, this should not be spoofed and she be typically auto-set by MantisBT. However, for scenarios like migration tools, it makes sense to be able to set this and be honored. Hence, I think that we should honor it based on a configurable access level.

coyttl

coyttl

2009-12-11 11:06

reporter   ~0023895

Thanks. I'm working on a migration tool, so to myself (and users of the tool), it would be useful.

Wepl

Wepl

2010-05-01 13:30

reporter   ~0025360

Last edited: 2010-05-01 13:42

I'm using this change on 1.2.0 to fix that behavior:

diff -r mantisbt-1.2.0/api/soap/mc_issue_api.php mantisbt-1.2.0-wepl/api/soap/mc_issue_api.php
515c515,516
< $t_version = $p_issue['version'];

  $t_date_submitted = $p_issue['date_submitted'];
  $t_version = isset($p_issue['version']) ? $p_issue['version'] : '';

725c729
< $t_bug_data->date_submitted = isset( $v_date_submitted ) ? $v_date_submitted : '';

$t_bug_data->date_submitted = $t_date_submitted;

diff -r mantisbt-1.2.0/core/bug_api.php mantisbt-1.2.0-wepl/core/bug_api.php
349a350,351

  $c_date_submitted = !is_blank( $this->date_submitted ) ? $this->date_submitted : db_now();

369c371
< db_query_bound( $query, Array( $this->project_id, $this->reporter_id, $this->handler_id, $this->duplicate_id, $this->priority, $this->severity, $this->reproducibility, $t_status, $this->resolution, $this->projection, $this->category_id, db_now(), db_now(), $this->eta, $t_text_id, $this->os, $this->os_build, $this->platform, $this->version, $this->build, $this->profile_id, $this->summary, $this->view_state, $this->sponsorship_total, $this->sticky, $this->fixed_in_version, $this->target_version, $this->due_date ) );

  db_query_bound( $query, Array( $this->project_id, $this->reporter_id, $this->handler_id, $this->duplicate_id, $this->priority, $this->severity, $this->reproducibility, $t_status, $this->resolution, $this->projection, $this->category_id, $c_date_submitted, db_now(), $this->eta, $t_text_id, $this->os, $this->os_build, $this->platform, $this->version, $this->build, $this->profile_id, $this->summary, $this->view_state, $this->sponsorship_total, $this->sticky, $this->fixed_in_version, $this->target_version, $this->due_date ) );
tino

tino

2012-03-19 18:48

reporter   ~0031492

Last edited: 2012-03-19 19:32

I'm facing this issue in Mantis BT version 1.2.9. Is there any plan to fix this issue?
The solution from Wepl is still working.

vboctor

vboctor

2012-03-21 01:06

manager   ~0031501

It would help if someone can implement this on a fork in github and send a pull request. I would like this feature to be controlled by an access level (migration_access_level or something similar) that is set to ADMINISTRATOR by default.