Defect #690

Custom issue fields not displayed on "New issue" page

Added by Paul Macdonnell over 12 years ago. Updated over 12 years ago.

Status:ClosedStart date:2008-02-18
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Custom fields
Target version:-
Resolution:Invalid Affected version:

Description

We have 2 custom fields for issues to help identify a person creating a new issue (not all of our users have a redmine login.
These 2 fields aren't be displayed anymore.
We are currently running 0.6.devel.1163 with the Classic theme. I have double checked that they also don't appear on the Alternate or Default theme's as well.

History

#1 Updated by Paul Macdonnell over 12 years ago

Some more information to this.
I found what part of the problem is, it was partially a configuration problem and partly a defect.
Configuration was because we only had the custom fields for some of our trackers, I added the trackers to the custom fields and it appeared again fine.
However, when you change the tracker to one that does have the custom fields enabled, when you are creating a new issue, the custom fields don't appear.

I have only tested this on Issue custom fields, I haven't tested it on the Project or Users custom fields.

#2 Updated by Jos Yule over 12 years ago

Did you add the custom fields via the projects - settings - information pane? I was testing custom fields, and didn't know that they appeared here. If you have the 'use in all projects' checked off in the custom field page itself, they should appear regardless.

#3 Updated by Jean-Philippe Lang over 12 years ago

  • Category set to Custom fields

I can't reproduce this problem.
As Jos mentioned, make sure that the custom field is either associated to your project (see project settings) or marked as 'for all projects'.

#4 Updated by Paul Macdonnell over 12 years ago

Yes, I do have the "use in all projects" checked. I added them via the Administration -> Custom Fields pane.
A bit of history might make this a little more clear.
We currently have 5 different trackers for our issues. Back when I added the custom fields we only had 3 trackers (all when running on 0.51).
I guess it could have been remnants of the old system coming through in the upgrade 0.6.devel.1162 and 1163.

The only other problem, if your custom fields aren't only applied to all of the trackers, when you create a new issue, the custom fields are either always available or never available for all trackers.

EG.
Trackers:
Incident
Problem
Feature
Support

Custom Fields:
Requestor Name
Requestor Email

Associations:
Requestor Name : Problem, Feature
Requestor Email: Problem, Feature

When you create a new issue within the Incident tracker, the custom fields aren't available (which is correct).
When you change the tracker to Problem (or Feature), the custom fields still aren't available (which is incorrect).

Because Incident is the first (default) tracker, the Issue creation page uses this to determine which fields to show, or not show (from what I can gather from my testing).

How I tested this:
Administration -> Custom fields
Create 2 custom fields * Name: <anyname> * Format: text * Min - Max: 0 - 60 * RegExp: <empty> * default: <empty> * Trackers:
Incident no
Problem yes
Feature yes
Support no * Required: no * For all projects: yes * Used as a filter: yes * Searchable: yes

Go to a project
Create a new issue
Custom fields don't appear for me
Change tracker to Problem (or Feature)
Custom fields still don't appear (I believe they should here as the custom field is valid for this tracker)

#5 Updated by Jean-Philippe Lang over 12 years ago

When you change the tracker to Problem (or Feature), the custom fields still aren't available (which is incorrect).

The form should be updated with appropriate custom fields when changing the tracker.
Do you see an ajax call when you change the tracker on the new issue form ?

#6 Updated by Paul Macdonnell over 12 years ago

No, I don't.
I'm also seeing a javascript error on the new issue page.

missing } after property list
http://my.host.name/projects/myproject/issues/new
Line 156

new Form.Element.EventObserver('issue_tracker_id', function(element, value) {new...

#7 Updated by Paul Macdonnell over 12 years ago

I'm using Firefox 2.0.0.12 as my browser

#8 Updated by Paul Macdonnell over 12 years ago

Under IE7, I get the same error, but on line 158.

This is running redmine 0.6.devel.1163

#9 Updated by Jean-Philippe Lang over 12 years ago

I'm using Firefox 2.0.0.12 too and I don't even get a warning. It works fine.
I also tested with IE 6 & 7, Safari 3 and Opera 8.

Can you post the javascript code that you see in the page source, just after the tracker select tag. Here is mine:

new Form.Element.EventObserver('issue_tracker_id', function(element, value) {new Ajax.Updater('content', '/projects/redmine/issues/new', {asynchronous:true, evalScripts:true, parameters:Form.serialize('issue-form')})})

And could you tell me which Rails version you're using (this javascript code is generated by Rails) ?

#10 Updated by Paul Macdonnell over 12 years ago

Thanks for following this up.

This is the javascript line I have:
new Form.Element.EventObserver('issue_tracker_id', function(element, value) {new Ajax.Updater('content', '/projects/onlinev2/issues/new', {asynchronous:true, evalScripts:true, parameters:'Form.serialize('issue-form')=' + value})})

There is a slight difference between the two and judging by the looks of it, that's where our (well, my) problem is.

I'm running Rails 1.2.3

#11 Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Please upgrade to Rails 1.2.6 or 2.0.2 as mentionned in the Install Doc and reopen if it still doesn't work.

#12 Updated by Paul Macdonnell over 12 years ago

Thanks, the rails update has fixed the issue. My apologies for not properly checking the requirements first.
Thanks for the help finding my problem.

Also available in: Atom PDF