Defect #16259
closedChanging Tracker value on new issue form makes hidden fields appearing after hitting F5
0%
Description
While creating a new issue, when changing the 'Tracker' value, the 'Status' field is shown (it should not), and all other fields that should be hidden (considering the selected tracker) are properly hidden.
After pressing F5 key, in order to refresh the page, the 'Status' field is hidden (as it should), but all other fields are appearing on the issue form, even the fields that should be hidden for the selected tracker.
Updated by druidPollux - over 10 years ago
Environment:
Redmine version 2.5.0.devel
Ruby version 1.9.3-p484 (2013-11-22) [i386-mingw32]
Rails version 3.2.17
Environment production
Database adapter Mysql2
Updated by druidPollux - over 10 years ago
Steps to reproduce:
- Go to Settings > Workflow > Fields permissions
- Select - Role: 'all' - Tracker: 'Feature'
- Edit
- Set Priority to 'Read-only' for Issue status 'New'
- Save the changes
- Go to projects
- Create a new project
- Create a New issue
=> Tracker is set to 'Bug'
=> Status field is hidden
=> and Priority field is visible
- Change Tracker to 'Feature'
=> Status field is visible (it should not)
=> and Priority is now hidden (as it should)
- Refresh page (press F5)
=> Status field is hidden (as it should)
=> and Priority is now visible (but it should not)
- Change Tracker to 'Bug'
=> Status field is visible (it should not)
=> Priority field is visible (as it should)
Updated by Jean-Philippe Lang over 10 years ago
- Subject changed from Changing Tracker value on new issue form makes hidden fields appearing to Changing Tracker value on new issue form makes hidden fields appearing after hitting F5
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 2.5.1
- Resolution set to Fixed
Ths problem with the priority field comes from the fact that some browsers like Firefox preserves select tags values when hitting F5: when you reload the form with F5, Redmine generates the form for an issue with the default tracker (Bug) for which the priority field is visible but your browser preserves the previously selected tracker (Feature). This is fixed in r12970 with a few lines a javascript.
For the status field problem, please post a separate issue. AFAIK, the status field cannot be hidden when first loading the form.