APPLICATION ERROR #401
Database query failed. Error received from database was #1052: Column 'due_date' in order clause is ambiguous for the query: SELECT DISTINCT mantis_bug_table.*, mantis_bug_table.last_updated, mantis_bug_table.date_submitted, mantis_custom_field_string_table_4.value due_date FROM mantis_bug_text_table, mantis_project_table, mantis_bug_table LEFT JOIN mantis_bugnote_table ON mantis_bug_table.id = mantis_bugnote_table.bug_id LEFT JOIN mantis_bugnote_text_table ON mantis_bugnote_table.bugnote_text_id = mantis_bugnote_text_table.id LEFT JOIN mantis_custom_field_string_table mantis_custom_field_string_table_4 ON mantis_bug_table.id = mantis_custom_field_string_table_4.bug_id AND mantis_custom_field_string_table_4.field_id = 4 WHERE mantis_project_table.enabled = ? AND mantis_project_table.id = mantis_bug_table.project_id AND ( mantis_bug_table.project_id = 46 ) AND mantis_bug_table.bug_text_id = mantis_bug_text_table.id AND ( ( (summary LIKE ?) OR (mantis_bug_text_table.description LIKE ?) OR (mantis_bug_text_table.steps_to_reproduce LIKE ?) OR (mantis_bug_text_table.additional_information LIKE ?) OR (mantis_bugnote_text_table.note LIKE ?) ) ) ORDER BY sticky DESC, due_date DESC, mantis_bug_table.last_updated DESC, mantis_bug_table.date_submitted DESC.
Sorting by due date causes APPLICATION ERROR #401
Moderators: Developer, Contributor
Sorting by due date causes APPLICATION ERROR #401
I clicked on "Due Date" to have it sort by due date and now I just get this error message. Unfortunately some of our users have done this as well today and now can't view issues.
Re: Sorting by due date causes APPLICATION ERROR #401
Just checked sorting by other columns, seems due_date is the only one that will break it.
Re: Sorting by due date causes APPLICATION ERROR #401
We have upgraded from 1.2.1 to 1.2.3 and are still seeing the problem. Any ideas on how to troubleshoot further?
Re: Sorting by due date causes APPLICATION ERROR #401
This part of your query seems strange to me
Temporary remove all custom fields from list of your columns to see if the problem is caused by your custom fields.
Code: Select all
mantis_custom_field_string_table_4.value due_date FROM Re: Sorting by due date causes APPLICATION ERROR #401
This only happens when we sort by our custom field "Due Date"
Re: Sorting by due date causes APPLICATION ERROR #401
So we where talking about different things.
I tried with standard field due date, your tried with your custom field due date.
This is exactly the reason for the problem: MantisBT is not able to work with custom fields which have the some name like standard fields.
Probably a bug.
So there is just a workaround at the moment by renaming your custom field.
I tried with standard field due date, your tried with your custom field due date.
This is exactly the reason for the problem: MantisBT is not able to work with custom fields which have the some name like standard fields.
Probably a bug.
So there is just a workaround at the moment by renaming your custom field.
Re: Sorting by due date causes APPLICATION ERROR #401
I changed it from "Due Date" to "Due-Date" but its still throwing the error on sort.
Re: Sorting by due date causes APPLICATION ERROR #401
Do you get the same error or now another one?
I suggest this is caused by the "-"
See also http://www.mantisbt.org/bugs/view.php?id=12404
Maybe the best workaround is to name the field "Due Date" with two spaces between Due and Date
Code: Select all
Database query failed. Error received from database was #1052: Column 'due_date' in order clause is ambiguousI suggest this is caused by the "-"
See also http://www.mantisbt.org/bugs/view.php?id=12404
Maybe the best workaround is to name the field "Due Date" with two spaces between Due and Date
Re: Sorting by due date causes APPLICATION ERROR #401
Why don't you try deleting this field all together and creating a new one called Date Due and see if this works?
Re: Sorting by due date causes APPLICATION ERROR #401
The two spaces worked like a charm. Thanks for all your help.