Defect #16259

Changing Tracker value on new issue form makes hidden fields appearing after hitting F5

Added by druidPollux - almost 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:2.5.1
Resolution:Fixed Affected version:

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.

Associated revisions

Revision 12970
Added by Jean-Philippe Lang almost 5 years ago

Select proper tracker and status for when hitting F5 with browsers that preserve select values on reload, eg. Firefox (#16259).

History

#1 Updated by druidPollux - almost 5 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

#2 Updated by druidPollux - almost 5 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)

#3 Updated by Jean-Philippe Lang almost 5 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.

#4 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF