View Issue Details

IDProjectCategoryView StatusLast Update
0022325mantisbtfilterspublic2017-04-01 00:13
Reportermahindra Assigned Tocproensa  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.1.0 
Summary0022325: Sort by custom field in View issues page - doesn't work - or you will get an error in "filters"
Description

By definition of a column of a custom field in "my account" - I am not able to sort the entries in filters
If I click the column I will get the following error

<pre>
APPLICATION ERROR 0000202
Eine Zeichenkette wurde erwartet, aber ein Feld wurde für view_state übergeben.
Bitte benutzen Sie die „Zurück“-Taste Ihres Browsers, um auf die vorhergehende Seite zurückzukehren. Dort können Sie den hier angezeigten Eintrag korrigieren oder eine andere Aktion ausführen. Über das Menü können Sie auch direkt zu einer anderen Aktion wechseln.
</pre>

TagsNo tags attached.
Attached Files
order_by_custom-field.png (50,782 bytes)   
order_by_custom-field.png (50,782 bytes)   
error401.png (140,778 bytes)   
error401.png (140,778 bytes)   
has_not_changed_since_1.x.x.png (116,740 bytes)   
has_not_changed_since_1.x.x.png (116,740 bytes)   
old-entries_from_1.x.png (70,634 bytes)   
old-entries_from_1.x.png (70,634 bytes)   

Relationships

related to 0022555 closedcproensa Regression in custom field sorting 

Activities

cproensa

cproensa

2017-02-06 14:57

developer   ~0055511

mahindra,
I could not reproduce this issue in 2.1

The provided information is not sufficient to provide any help in resolving the issue. A complete and detailed description is required for the support team to get a clear understanding of the problem.

Please explain what you do, what are the results you expect to get and what you actually get.

Also provide detailed, step-by-step instructions to reproduce the issue; the additional information listed below may also be useful:

  • Exact version of MantisBT, PHP, Database, Web server, Browser and Operating System
  • Relevant customizations (e.g. changes in config_inc.php, etc)
  • Installed plugins or custom functions ?
  • Was the MantisBT source code modified in any way ?
mahindra

mahindra

2017-02-06 17:28

reporter   ~0055514

Thank you for your reply and your patience!

It seems that you are right - or this is a problem with the Browser Cache.

Because I want to reproduce this at home and put the custom field in the last column - and it works ??

I will get more information - it looks like a browser cache problem
In the company we use the Inernet Explorer 11
At home I use edge and IE11 - and it works

at home ok.png (38,308 bytes)   
at home ok.png (38,308 bytes)   
mahindra

mahindra

2017-02-07 05:37

reporter   ~0055522

I was able to reproduce this at work - only with IE11.
It's a Caching issue of our Browser in my working IT enviroment - if you delete the Browser Cache and close IE - everything works.

My colleague told me that he deleted the cache, possible he had not closed the browser after that.

=> You could close the ticket.

Thank you!!!!

dregad

dregad

2017-02-07 05:40

developer   ~0055524

Thanks for the feedback.

mahindra

mahindra

2017-02-08 14:09

reporter   ~0055587

I've figured it out
here on http://www.mantisbt.org/bugs/

=> Database query failed. Error received from database was #1054: Unknown column 'mantis_bug_table.steps_to_reproduce' in 'order clause' for the query: SELECT DISTINCT mantis_bug_table.* FROM mantis_bug_table JOIN mantis_project_table ON mantis_project_table.id = mantis_bug_table.project_id WHERE mantis_project_table.enabled = ? AND ( ( mantis_bug_table.project_id in (1, 12, 20, 25, 11, 21, 10, 15, 14, 16, 9, 22, 6, 13, 7, 8, 18) ) AND ( ( mantis_bug_table.view_state = 10 ) OR ( mantis_bug_table.reporter_id = 5199) )) AND ( ( mantis_bug_table.status in (?, ?, ?, ?, ?, ?) ) ) ORDER BY mantis_bug_table.sticky DESC, mantis_bug_table.steps_to_reproduce DESC, mantis_bug_table.last_updated DESC, mantis_bug_table.date_submitted DESC.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

mahindra

mahindra

2017-02-08 14:12

reporter   ~0055588

The error is in the "All Projects" view and you will have to add "tags" and a second field
Then sort the entries and you will get an error, which could be only removed by "Reset Columns Configuration" for all projects

mahindra

mahindra

2017-02-08 14:35

reporter   ~0055589

This is similar to the error we get.
Our Head of IT is a Mantis - Power-User and works with Permalinks on all projects and sends them to team members, to manage their tasks - "they are happy", error occurs.... ;)

mahindra

mahindra

2017-02-08 14:44

reporter   ~0055590

Attention - before reproduce this, open a second tab in the browser with column Settings to be able to "Reset Columns Configuration" in your account!

cproensa

cproensa

2017-02-08 16:29

developer   ~0055591

This is similar to 0021592.
It's reproducible simply by using "steps to reproduce" as a sorting field.
Notice how that field is not sortable directly from the column headers, but still it's available in the filter box sort section.

However, this error (401), is not the originally posted (202)
If it's actually a different than the original repert, i'd rather have it as a separated issue

cproensa

cproensa

2017-02-08 16:31

developer   ~0055592

Our Head of IT is a Mantis - Power-User and works with Permalinks on all projects and sends them to team members, to manage their tasks - "they are happy", error occurs.... ;)

How does this relates to permalinks?

mahindra

mahindra

2017-02-08 16:44

reporter   ~0055594

Indirect, if it is/was working on his Profile, he is sending the links to others, they have other column definitions, and if this is not compatible, or they sort the results, they have the error.

We are using custom fields for hours and weeks so the programmers get the Link with their List and then they sort it

cproensa

cproensa

2017-02-08 16:56

developer   ~0055595

@mahindra
I have created 0022347 to track this issue.

Is there other kind of error related to the original report here, or can this be closed?

mahindra

mahindra

2017-02-08 17:07

reporter   ~0055596

He also has some Permalinks from 1.3.x out maybe an error handling, if a crashing filter is the result, will be ideal.
And I don't know if the format of custom fields is related to this issue.
If 0022347 handles this you could close this ticket

mahindra

mahindra

2017-02-08 17:08

reporter   ~0055597

Thank you!

cproensa

cproensa

2017-02-08 17:14

developer   ~0055599

He also has some Permalinks from 1.3.x out maybe an error handling, if a crashing filter is the result, will be ideal.
And I don't know if the format of custom fields is related to this issue.
If 0022347 handles this you could close this ticket

No, if there is an error with permalinks it won't be fixed by 0022347
Can provide specific information regarding that error? Open a separate issue in that case

mahindra

mahindra

2017-02-08 17:18

reporter   ~0055600

What about non sortable custom-fields?
Could this be a problem, too?

badfiles

badfiles

2017-02-09 04:10

reporter   ~0055602

Last edited: 2017-02-10 09:37

I have the same problem, if I click on a custom field header, it does nothing. The link looks like this:

/view_all_set.php?sort_add=custom_%D1%82%D0%BA&dir_add=DESC&type=2
badfiles

badfiles

2017-02-09 04:12

reporter   ~0055603

The amps are normal, it's just another mantis bug ;)

cproensa

cproensa

2017-02-09 04:22

developer   ~0055604

What about non sortable custom-fields?
Could this be a problem, too?

Custom fields are always sortable, as far as i know.

cproensa

cproensa

2017-02-09 04:31

developer   ~0055605

I have the same problem, if I click on a custom field header, it does nothing. The link looks like this:

I cant reproduce this, still. I have custom fields and the sort fine, from filter, and from column header...
can you find more info on what exact scenario does that fail?

mahindra

mahindra

2017-02-09 08:25

reporter   ~0055613

Slowly we get behind it - with Permalinks and the filter errors - this is a

mantisbt - 1.3.6 – custom fields are all lower case – this permalink does not work with 2.x.x:

http://www.YOURDOMAIN.at/mantis/search.php?status[]=10&amp;status[]=20&amp;status[]=30&amp;status[]=40&amp;status[]=50&amp;handler_id=373&amp;sticky=on&amp;sort=custom_umsetzung%20in%20kw%2Cpriority&amp;dir=ASC%2CDESC&amp;hide_status=-2&amp;match_type=0

mantisbt – 2.1.x – custom fields are upper case like they are defined in the admin dialog:

http:// www.YOURDOMAIN.at/mantis/search.php?status[]=10&status[]=20&status[]=30&status[]=40&status[]=50&handler_id=373&sticky=on&sort=custom_Umsetzung%20in%20KW%2Cpriority&dir=ASC%2CDESC&hide_status=-2&match_type=0

<b>1.3.x sort=custom_umsetzung => 2.x.x custom_Umsetzung</b>

You could reproduce the error if you define a column in your account settings, were you store everything in lower case.

AND

If hou have defined a custom-field before in 1.3.x in lower case in “View Issues Columns” and you migrate to mantis 2.x.x, so you will get the error in “view_all_bug_page.php” – that is the cause!!!!

mahindra

mahindra

2017-02-09 08:49

reporter   ~0055615

In 1.3.x all permalinks (filters also?) were generally lowercase - so it will be possible to run in problems with mantisbt origin fields.
It shoul be checked in the account settings also in 2.x.x

mahindra

mahindra

2017-02-09 09:35

reporter   ~0055616

you remember 2017-02-06 16:07 http://www.mantisbt.org/bugs/file_download.php?file_id=7156&amp;type=bug => custom_umsetzung_in_kw 2.x.x Needs custom_Umsetzung_in_KW

order_by_custom-field-2.png (50,782 bytes)   
order_by_custom-field-2.png (50,782 bytes)   
badfiles

badfiles

2017-02-09 14:59

reporter   ~0055618

I cant reproduce this, still. I have custom fields and the sort fine, from filter, and from column header...
can you find more info on what exact scenario does that fail?
If there is a capital letter in a custom field name, sorting will stop working.

cproensa

cproensa

2017-02-09 16:10

developer   ~0055619

If there is a capital letter in a custom field name, sorting will stop working.

sorry..., i have custom fields with capital letters, spaces, and symbols, and they work in sorting.

Can you provide a more detailed steps to reproduce this issue? Starting from a clean mantis installation

badfiles

badfiles

2017-02-09 16:40

reporter   ~0055620

In my case custom field names contain a capital letter (example 'TK'), but View Issues Columns in account settings had all lower case column name (example 'custom_tk'), as old Mantis versions (including 2.0.0) suggested.
view_all_bug_page.php still shows custom values, but sorting stopped working work. To fix this I had to set columns as new version suggests (example 'custom_TK').

To reproduce set a custom field name w/o capitals, then set up the corresponding column in View Issues Columns, then put one of name's letters to upper case. This will leave small letters in column settings and break sorting, but will not break displaying custom field values.

mahindra

mahindra

2017-02-09 16:40

reporter   ~0055621

This is a case sensitive error especially after migration from 1.3.x to 2.0

mahindra

mahindra

2017-02-09 16:47

reporter   ~0055622

As workaround we resetted the columns settings and defined it new case sensitive.

After that you could generate new Permalinks 0022325:0055613 and everything is working again.
The Problem ist that Users do not know what they should do to repair that, because the settings are in their account for years

mahindra

mahindra

2017-02-09 16:50

reporter   ~0055623

So it's not an error of 2.0 where could be a case sensitive check in the account settings

It's a migration error or a compatibility problem between the 1.x and the 2.x mantis tree

cproensa

cproensa

2017-02-09 18:14

developer   ~0055624

I have tried:

  • Settings view columns including a capitalized custom field (let's call it CCF), with version 1.3.1. View the project with same user in version 2.1
  • Save a filter that includes sorting by that CCF, in version 1.3.1. Use that filter with version 2.1
  • Create a permalink that includes sorting by that CCF, with version 1.3.1. Use that permalink in version 2.1

I can't reproduce an error.
At most, the custom fields is not used in the sort property, probably due to being named differently (lower case vs upper case letters), but no errors though.

mahindra

mahindra

2017-02-09 19:07

reporter   ~0055625

Something has stored the different entries earlier.
We have a workaround let's see how many users will run into this problem.

badfiles

badfiles

2017-02-10 01:40

reporter   ~0055630

It's pretty obvious that earlier existed code putting View Issues Columns and All Available Columns values into lower case. It still exists for displaying values, but removed for filtering.

cproensa

cproensa

2017-02-10 03:20

developer   ~0055631

It's pretty obvious that earlier existed code putting View Issues Columns and All Available Columns values into lower case. It still exists for displaying values, but removed for filterin

Than change was made for these: 0020248 0017367 0021713

I'd like to get a reproducible scenario to resolve if there's an error, as a priority.

mahindra

mahindra

2017-02-10 09:03

reporter   ~0055642

Sounds good!

Thank you!

mahindra

mahindra

2017-02-11 00:51

reporter   ~0055650

Is the solution to automatically press the reset columns button during upgrade?
Plus a non-case sensitive permalink?

mahindra

mahindra

2017-03-03 09:46

reporter   ~0055894

After "Reset Columns Configuration" and doing the patches from 2.1.1, we have no problems any more - also in 2.2.0.
So I think this is a Migration Topic in combination with earlier mantis versions and old Permalinks

It should be enough if the support knows this.

cproensa

cproensa

2017-03-27 17:02

developer   ~0056229

I am resolving this, since the cause seems to be the issue described in 0022555, which has been fixed

mahindra

mahindra

2017-03-28 14:39

reporter   ~0056237

Thank you very much.
0022555 sounds very good, I think you can close this ID.
If we find something similar in 2.2.3 we will inform you.