View Issue Details

IDProjectCategoryView StatusLast Update
0012691mantisbtsqlpublic2013-01-02 02:54
Reporterjoergahrens Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
OSLinux 
Product Version1.2.4 
Summary0012691: wrong SQL when filtering and sorting by custom field
Description

see steps to reproduce

Steps To Reproduce

1) in create a custom field and add it to filter
2) add this field to "view issues"
3) go to "view issues"
4) use a filter containing the new custom field
5) in result sort by the new custom field

Additional Information

APPLICATION ERROR 0000401

Datenbankabfrage fehlgeschlagen. Die Reportmeldung lautet #1066: Not unique table/alias: 'mantis_custom_field_string_table_1' für die Abfrage: SELECT Count( DISTINCT mantis_bug_table.id ) as idcnt FROM mantis_project_table, mantis_bug_table LEFT JOIN mantis_custom_field_string_table mantis_custom_field_string_table_1 ON mantis_custom_field_string_table_1.bug_id = mantis_bug_table.id AND mantis_custom_field_string_table_1.field_id = 1 LEFT JOIN mantis_custom_field_string_table mantis_custom_field_string_table_1 ON mantis_bug_table.id = mantis_custom_field_string_table_1.bug_id AND mantis_custom_field_string_table_1.field_id = 1 WHERE mantis_project_table.enabled = ? AND mantis_project_table.id = mantis_bug_table.project_id AND (mantis_custom_field_string_table_1.value = '0,5 MT').

TagsNo tags attached.

Activities

Dom75

Dom75

2011-03-30 09:39

reporter   ~0028509

Hi,
i've reproduced the issue. If you delete the MANTIS_VIEW_ALL_COOKIE cookie you remove the error.

duwil

duwil

2011-04-11 10:47

reporter   ~0028586

maybe it is the same of: http://www.mantisbt.org/bugs/view.php?id=5859

schan

schan

2011-06-02 22:31

reporter   ~0028902

Dom75 's suggestion work, but WHY?

Lapinkiller

Lapinkiller

2011-06-06 02:57

reporter   ~0028921

It have been resolved in 1.2.5 ;)

atrol

atrol

2012-12-23 07:00

developer   ~0034605

joergahrens,

I was not able to reproduce your problem with a fresh install of the latest stable version of MantisBT (1.2.12 at the moment).

I recommend that you upgrade to the latest stable version [1]; if after doing so the problem persists, do not hesitate to reopen the issue.

[1] https://sourceforge.net/projects/mantisbt/files/mantis-stable/