Patch #30919

Group Issues Custom Fields - (Form like Issues)

Added by Frederico Camara over 2 years ago. Updated 27 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-

Description

This patch adds a new tab in the project settings. In this tab, you can reorder and group custom fields for each tracker.

Reordering and grouping custom fields makes them appear as this for this project only in vieweing an issue and editing an issue.

It was developed for Redmine 3.2. In Redmine 3.4~, you can make a custom field take the full width, which makes these go to the bottom of the issue page. I had to adapt it so that you can still reorder the half width custom fields separated from the full width custom fields.

If it sounds confusing, see the screenshots (sorry they are in portuguese).

To apply:

patch p1 < GCF<your redmine version>.patch
touch tmp/restart.txt
RAILS_ENV=production bundle exec rake db:migrate

PDF and email formatting not implemented yet.

GCF1.jpg - Settings tab for Grouping Custom Fields (128 KB) Frederico Camara, 2019-02-25 16:58

GCF2.jpg - Grouped Custom Fields in a new issue (109 KB) Frederico Camara, 2019-02-25 16:58

GCF3.jpg - Grouped Custom Fields in a new issue (filled) (160 KB) Frederico Camara, 2019-02-25 16:58

GCF4.jpg - Issue view with Grouped Custom Fields (137 KB) Frederico Camara, 2019-02-25 16:58

GCF-3.2.patch Magnifier (21.8 KB) Frederico Camara, 2019-02-25 17:05

GCF-3.4.patch Magnifier (25.7 KB) Frederico Camara, 2019-02-25 17:05

GCF-4.0.patch Magnifier (26.3 KB) Frederico Camara, 2019-02-25 17:05

GCFep-4.0.patch Magnifier (12.7 KB) Frederico Camara, 2019-02-27 15:03

GCFep-3.4.patch Magnifier (12.7 KB) Frederico Camara, 2019-02-27 15:03

GCFep-3.2.patch Magnifier (6.4 KB) Frederico Camara, 2019-02-27 15:03

GCF-3.4-final1.patch Magnifier (39.3 KB) Frederico Camara, 2019-03-01 17:22

GCF-4.0-final1.patch Magnifier (39.9 KB) Frederico Camara, 2019-03-01 17:22

GCF-3.2-final1.patch Magnifier (33.6 KB) Frederico Camara, 2019-03-01 17:22

GCF-4.0-final1-fixed.patch Magnifier - Fix for rails 5 or greater (39.9 KB) Frederico Camara, 2020-01-01 19:28

Snímek obrazovky 2020-01-05 v 9.58.02.png (42.9 KB) Petr Kokosak, 2020-01-05 09:59

Snímek obrazovky 2020-01-05 v 9.58.36.png (65.1 KB) Petr Kokosak, 2020-01-05 09:59

Snímek obrazovky 2020-01-05 v 9.58.52.png (46.4 KB) Petr Kokosak, 2020-01-05 09:59

GCF-4.1.patch Magnifier - For Redmine 4.1 (34.1 KB) Frederico Camara, 2020-04-17 23:02

group.png (10.9 KB) Yuri Azanov, 2020-04-18 21:43

0001-Add-Group-Issue-Custom-Fields-functionality.patch Magnifier - For Redmine 4.2.1 (37.2 KB) Frederico Camara, 2021-07-28 16:12

issue_error_exporting_to_pdf.PNG (92.6 KB) Lúcia Rodrigues, 2021-08-23 18:41

0001-fix-pdf-generation-of-full-width-layout.patch Magnifier - Apply over previous patches to fix pdf export (wide) (1.75 KB) Frederico Camara, 2021-08-23 21:12


Related issues

Related to Redmine - Feature #35281: [Meta] (Issues) Custom (and Standard) Fields Grouping and... New

History

#1 Updated by Frederico Camara over 2 years ago

Cant edit description. Forgot to include the patch. For stable versions of Redmine 3.2, 3.4 and 4.0.

To apply:

patch -p1 < GCF-<your redmine version>.patch
touch tmp/restart.txt
RAILS_ENV=production bundle exec rake db:migrate

#2 Updated by Go MAEDA over 2 years ago

  • Target version set to Candidate for next major release

#3 Updated by Frederico Camara over 2 years ago

Including patches for mail and pdf formatting. Apply after the first patch:

patch -p1 < GCFen-<your redmine version>.patch
touch tmp/restart.txt

#4 Updated by Frederico Camara over 2 years ago

BUGFIX: Can't delete projects, trackers, custom_fields if there is any grouping.

- Very problematic, you would have to look project by project, remove groups. This patch fixes everything.
- Other fix: the database position entry was created incorrectly. acts_as_list has to set position to null.
- A bit of code refactoring.

Consolidated patch.

This is a consolidated patch for redmine 3.2, 3.4 and 4.0. Apply just this one.

patch -p1 < GCF-<your redmine version>.patch
RAILS_ENV=production bundle exec rake db:migrate
touch tmp/restart.txt

#5 Updated by Zoltán Schmidt over 1 year ago

I have installed the patch and does not work.
Please give me some advice, how to use your patch!
Redmine version: 4.0.5.stable

The result:

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

Back

and the production.log:

Redirected to https://oururl/
Completed 302 Found in 35ms (ActiveRecord: 23.6ms)
Started GET "/" for 80.95.86.254 at 2019-12-31 20:24:13 +0000
Processing by WelcomeController#index as HTML
Current user: myname (id=21)
Rendering welcome/index.html.erb within layouts/base
Rendered welcome/index.html.erb within layouts/base (3.5ms)
Completed 200 OK in 156ms (Views: 15.1ms | ActiveRecord: 12.0ms)
Started GET "/projects" for 80.95.86.254 at 2019-12-31 20:24:17 +0000
Processing by ProjectsController#index as HTML
Current user: myname (id=21)
Rendering projects/index.html.erb within layouts/base
Rendered projects/index.html.erb within layouts/base (11.8ms)
Completed 200 OK in 50ms (Views: 24.6ms | ActiveRecord: 13.3ms)
Started GET "/projects/ourproject" for 80.95.86.254 at 2019-12-31 20:24:19 +0000
Processing by ProjectsController#show as HTML
Parameters: {"id"=>"ourproject"}
Current user: myname (id=21)
Rendering projects/show.html.erb within layouts/base
Rendered projects/_members_box.html.erb (5.4ms)
Rendered projects/show.html.erb within layouts/base (19.4ms)
Completed 200 OK in 125ms (Views: 48.8ms | ActiveRecord: 19.3ms)
Started GET "/projects/ourproject/settings" for 80.95.86.254 at 2019-12-31 20:24:21 +0000
Processing by ProjectsController#settings as HTML
Parameters: {"id"=>"ourproject"}
Current user: myname (id=21)
Completed 500 Internal Server Error in 59ms (ActiveRecord: 10.6ms)

@NameError (uninitialized constant ProjectsController::AttributeGroup):


@app/controllers/projects_controller.rb:180:in `settings'

lib/redmine/sudo_mode.rb:63:in `sudo_mode'

#6 Updated by Frederico Camara over 1 year ago

Zoltán Schmidt wrote:

I have installed the patch and does not work.
Please give me some advice, how to use your patch!
Redmine version: 4.0.5.stable

Maybe you had issues with the database migration. Migrations are versioned since Rails 5.
I'm submitting a fixed 4.0 patch. if you already have it patched, try this:

# adds a '[4.2]' to the end of first line
cd <redmine directory>
sed 's/ActiveRecord::Migration$/&[4.2]/' -i db/migrate/20180913211420_create_attribute_groups.rb
sed 's/ActiveRecord::Migration$/&[4.2]/' -i db/migrate/20180913212008_create_attribute_group_fields.rb
sed 's/ActiveRecord::Migration$/&[4.2]/' -i db/migrate/20190301162408_change_group_position_attributes.rb
RAILS_ENV=production bundle exec rake db:migrate
touch tmp/restart.tmp

#7 Updated by Petr Kokosak over 1 year ago

Hello, please help me. I have installed the your patch for Redmine version 4.1.0.stable and work perfect.
I need help with designing items in a group.

My environment:
Redmine version 4.1.0.stable
Ruby version 2.7.0-p0 (2019-12-25) [x86_64-darwin18]
Rails version 5.2.4.1
Environment production
Database adapter Mysql2

How can I solve the following samples ?

First example :  9.58.02.png
Second example : 9.58.36.png
Third example : 9.58.52.png

Thank you so much for your answer.
Petr

#8 Updated by Frederico Camara over 1 year ago

Petr Kokosak wrote:

Hello, please help me. I have installed the your patch for Redmine version 4.1.0.stable and work perfect.
I need help with designing items in a group.

This is not addressed by this patch. It does not meddle with Redmine's original css widths. Maybe you should fix the width in a theme.

At this moment, this patch does not organize which information goes on the left or right column, or how much space it takes, they are distributed evenly. Redmine originally does not care which information goes where, or even the order. This is mainly to give the order more flexibility.

To have real forms in Redmine, the effort should be bigger. Redmine makes possible that different roles see different fields, and some custom fields show up only when the issue is at cartain statuses. A real form do not address any of these things.

Best Regards.

#9 Updated by Yuri Azanov over 1 year ago

Can you make diff patch for redmine 4.1.0 please?

#10 Updated by Frederico Camara over 1 year ago

Yuri Azanov wrote:

Can you make diff patch for redmine 4.1.0 please?

Here it is.

#11 Updated by Yuri Azanov over 1 year ago

Frederico Camara wrote:

Yuri Azanov wrote:

Can you make diff patch for redmine 4.1.0 please?

Here it is.

Thanks! I have some problem:
Patch apply successfully, no error.
DB migrate execute whitout any verbose steps in console (DB was not modifed!!! Why?).
New db migrate file found in db/mifrate folder (it's OK):
20180913211420_create_attribute_groups.rb
20180913212008_create_attribute_group_fields.rb
20190301162408_change_group_position_attributes.rb

After restart redmine there are error in production.log:
ActiveRecord::StatementInvalid (Mysql2::Error: Table 'bitnami_redmineplusagile.attribute_groups' doesn't exist: SHOW FULL FIELDS FROM `attribute_groups`):

tables was not created...why?

Environment:
Redmine version 4.1.0.stable
Ruby version 2.5.7-p206 (2019-10-01) [x86_64-linux]
Rails version 5.2.4.1
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp

#12 Updated by Frederico Camara over 1 year ago

Yuri Azanov wrote:

DB migrate execute whitout any verbose steps in console (DB was not modifed!!! Why?).

It does not make any sense. Wrong directory? Wrong command?

I used 'RAILS_ENV=production bundle exec rake db:migrate'.

#13 Updated by Yuri Azanov over 1 year ago

Now it's migrated successfully, thank.
I don't understand how it's work this subject.
There are new tab "Grouped Custom Fileds" in project settings, i fill Groupded Custom Fields, then press "+" and "Save" but there are nothing happened...
How it's work?

#14 Updated by Frederico Camara over 1 year ago

Yuri Azanov wrote:

Now it's migrated successfully, thank.
I don't understand how it's work this subject.
There are new tab "Grouped Custom Fileds" in project settings, i fill Groupded Custom Fields, then press "+" and "Save" but there are nothing happened...
How it's work?

Look at the reference jpgs I posted (first attachments on this issue). Your picture looks nothing like them.

Maybe you are using an old browser or have disabled javascript, or the css is not getting through to the browser.

#15 Updated by Yuri Azanov over 1 year ago

You are right. If change theme to Standard, it's worked nice!!!

It seem to me there are "PurpleMine2" theme trouble.

Thank you!Be healthy!

p.s. It would be nice make this option Global, for trackers (not only for each project...)

#16 Updated by Adriano Bellia 12 months ago

Hello,
wonderful patch.

I have Redmine 4.0.3

If I try to apply the patch it gives the followingg message

patch --dry-run -p1 < /home/bitnami/GCF-4.0-final1-fixed.patch
checking file app/controllers/projects_controller.rb
checking file app/helpers/issues_helper.rb
checking file app/helpers/projects_helper.rb
checking file app/models/attribute_group.rb
checking file app/models/attribute_group_field.rb
checking file app/models/custom_field.rb
checking file app/models/project.rb
checking file app/models/tracker.rb
checking file app/views/issues/_form_custom_fields.html.erb
checking file app/views/issues/show.html.erb
checking file app/views/projects/settings/_groupissuescustomfields.html.erb
checking file config/locales/en.yml
Hunk #1 succeeded at 1227 (offset 4 lines).
checking file config/locales/pt-BR.yml
Hunk #1 succeeded at 1243 (offset 4 lines).
checking file config/routes.rb
Hunk #1 succeeded at 108 (offset 3 lines).
checking file db/migrate/20180913211420_create_attribute_groups.rb
checking file db/migrate/20180913212008_create_attribute_group_fields.rb
checking file db/migrate/20190301162408_change_group_position_attributes.rb
checking file lib/redmine.rb
checking file lib/redmine/export/pdf/issues_pdf_helper.rb
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #2 succeeded at 74 with fuzz 1 (offset 6 lines).
Hunk #3 FAILED at 85.
Hunk #4 FAILED at 101.
Hunk #5 succeeded at 147 with fuzz 2 (offset -46 lines).
Hunk #6 succeeded at 174 (offset -46 lines).
Hunk #7 succeeded at 202 (offset -46 lines).
Hunk #8 succeeded at 222 (offset -46 lines).
Hunk #9 FAILED at 297.
Hunk #10 succeeded at 278 (offset -46 lines).
Hunk #11 succeeded at 286 (offset -46 lines).
Hunk #12 succeeded at 294 (offset -46 lines).
Hunk #13 succeeded at 334 (offset -46 lines).
Hunk #14 succeeded at 347 (offset -46 lines).
Hunk #15 succeeded at 366 (offset -46 lines).
3 out of 15 hunks FAILED
checking file public/stylesheets/application.css
Hunk #1 succeeded at 476 (offset 1 line).
Hunk #2 succeeded at 1551 (offset 1 line).
checking file test/fixtures/attribute_group_fields.yml
checking file test/fixtures/attribute_groups.yml

I have another patch applied on field permissions. Does it mean they are not compatible?

#17 Updated by Frederico Camara 12 months ago

Adriano Bellia wrote:

Hello,
wonderful patch.

I have Redmine 4.0.3

If I try to apply the patch it gives the followingg message

patch --dry-run -p1 < /home/bitnami/GCF-4.0-final1-fixed.patch
checking file app/controllers/projects_controller.rb
checking file app/helpers/issues_helper.rb
checking file app/helpers/projects_helper.rb
checking file app/models/attribute_group.rb
checking file app/models/attribute_group_field.rb
checking file app/models/custom_field.rb
checking file app/models/project.rb
checking file app/models/tracker.rb
checking file app/views/issues/_form_custom_fields.html.erb
checking file app/views/issues/show.html.erb
checking file app/views/projects/settings/_groupissuescustomfields.html.erb
checking file config/locales/en.yml
Hunk #1 succeeded at 1227 (offset 4 lines).
checking file config/locales/pt-BR.yml
Hunk #1 succeeded at 1243 (offset 4 lines).
checking file config/routes.rb
Hunk #1 succeeded at 108 (offset 3 lines).
checking file db/migrate/20180913211420_create_attribute_groups.rb
checking file db/migrate/20180913212008_create_attribute_group_fields.rb
checking file db/migrate/20190301162408_change_group_position_attributes.rb
checking file lib/redmine.rb
checking file lib/redmine/export/pdf/issues_pdf_helper.rb
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #2 succeeded at 74 with fuzz 1 (offset 6 lines).
Hunk #3 FAILED at 85.
Hunk #4 FAILED at 101.
Hunk #5 succeeded at 147 with fuzz 2 (offset -46 lines).
Hunk #6 succeeded at 174 (offset -46 lines).
Hunk #7 succeeded at 202 (offset -46 lines).
Hunk #8 succeeded at 222 (offset -46 lines).
Hunk #9 FAILED at 297.
Hunk #10 succeeded at 278 (offset -46 lines).
Hunk #11 succeeded at 286 (offset -46 lines).
Hunk #12 succeeded at 294 (offset -46 lines).
Hunk #13 succeeded at 334 (offset -46 lines).
Hunk #14 succeeded at 347 (offset -46 lines).
Hunk #15 succeeded at 366 (offset -46 lines).
3 out of 15 hunks FAILED
checking file public/stylesheets/application.css
Hunk #1 succeeded at 476 (offset 1 line).
Hunk #2 succeeded at 1551 (offset 1 line).
checking file test/fixtures/attribute_group_fields.yml
checking file test/fixtures/attribute_groups.yml

I have another patch applied on field permissions. Does it mean they are not compatible?

Not exactly, see that most of the patch would apply, except for lib/redmine/export/pdf/issues_pdf_helper.rb

Also, you should not assume -R (revert), as the patch must be applied.

The problem is I have found whitespaces in the source file and tried to fix that with the patch (I shouldn' have tried it). Probably maintainers fixed that concurrently. The result is a file (before the patch) somewhat different, so the patch gives errors. You may edit that part out of the patch and apply it manually, it's not that difficult. Most hunks just delete whitespaces.

#18 Updated by Adriano Bellia 12 months ago

Thank yoy for your reply, I didn't see it before.
I'll try soon and ask your help if I don't undestand something :)

Thank you again

Frederico Camara wrote:

Adriano Bellia wrote:

Hello,
wonderful patch.

I have Redmine 4.0.3

If I try to apply the patch it gives the followingg message

patch --dry-run -p1 < /home/bitnami/GCF-4.0-final1-fixed.patch
checking file app/controllers/projects_controller.rb
checking file app/helpers/issues_helper.rb
checking file app/helpers/projects_helper.rb
checking file app/models/attribute_group.rb
checking file app/models/attribute_group_field.rb
checking file app/models/custom_field.rb
checking file app/models/project.rb
checking file app/models/tracker.rb
checking file app/views/issues/_form_custom_fields.html.erb
checking file app/views/issues/show.html.erb
checking file app/views/projects/settings/_groupissuescustomfields.html.erb
checking file config/locales/en.yml
Hunk #1 succeeded at 1227 (offset 4 lines).
checking file config/locales/pt-BR.yml
Hunk #1 succeeded at 1243 (offset 4 lines).
checking file config/routes.rb
Hunk #1 succeeded at 108 (offset 3 lines).
checking file db/migrate/20180913211420_create_attribute_groups.rb
checking file db/migrate/20180913212008_create_attribute_group_fields.rb
checking file db/migrate/20190301162408_change_group_position_attributes.rb
checking file lib/redmine.rb
checking file lib/redmine/export/pdf/issues_pdf_helper.rb
Reversed (or previously applied) patch detected! Assume -R? [n] y
Hunk #2 succeeded at 74 with fuzz 1 (offset 6 lines).
Hunk #3 FAILED at 85.
Hunk #4 FAILED at 101.
Hunk #5 succeeded at 147 with fuzz 2 (offset -46 lines).
Hunk #6 succeeded at 174 (offset -46 lines).
Hunk #7 succeeded at 202 (offset -46 lines).
Hunk #8 succeeded at 222 (offset -46 lines).
Hunk #9 FAILED at 297.
Hunk #10 succeeded at 278 (offset -46 lines).
Hunk #11 succeeded at 286 (offset -46 lines).
Hunk #12 succeeded at 294 (offset -46 lines).
Hunk #13 succeeded at 334 (offset -46 lines).
Hunk #14 succeeded at 347 (offset -46 lines).
Hunk #15 succeeded at 366 (offset -46 lines).
3 out of 15 hunks FAILED
checking file public/stylesheets/application.css
Hunk #1 succeeded at 476 (offset 1 line).
Hunk #2 succeeded at 1551 (offset 1 line).
checking file test/fixtures/attribute_group_fields.yml
checking file test/fixtures/attribute_groups.yml

I have another patch applied on field permissions. Does it mean they are not compatible?

Not exactly, see that most of the patch would apply, except for lib/redmine/export/pdf/issues_pdf_helper.rb

Also, you should not assume -R (revert), as the patch must be applied.

The problem is I have found whitespaces in the source file and tried to fix that with the patch (I shouldn' have tried it). Probably maintainers fixed that concurrently. The result is a file (before the patch) somewhat different, so the patch gives errors. You may edit that part out of the patch and apply it manually, it's not that difficult. Most hunks just delete whitespaces.

#19 Updated by Ivan Nikhayev 11 months ago

Does GCF-4.1.patch can be used for 4.1.1?

#20 Updated by tonyq wang 8 months ago

Ivan Nikhayev wrote:

Does GCF-4.1.patch can be used for 4.1.1?

It works in my 4.1.1 redmine.

#21 Updated by Mischa The Evil 4 months ago

  • Related to Feature #35281: [Meta] (Issues) Custom (and Standard) Fields Grouping and Positioning added

#22 Updated by Mischa The Evil 4 months ago

  • Target version deleted (Candidate for next major release)

Instead of scheduling this specific implementation proposal, I've scheduled the meta issue that I've just created.

#23 Updated by Ben Huang about 1 month ago

Could you make diff patch for redmine 4.2.1 please?

#25 Updated by Ben Huang about 1 month ago

Thanks for your quickly support, it works perfect in 4.2.1 Redmine.

#26 Updated by Lúcia Rodrigues 28 days ago

The Patch GCP-4.1 works perfectly, except with PDF exporting.
The long text fields appear in a single line, going beyond the page boundaries and being cut off, as demonstrated in attached image.

I checked that the patch applied all the changes to the file issues_pdf_helper.rb like it was supposed. Do you have any idea what it could be and how I can solve this problem?

#27 Updated by Frederico Camara 28 days ago

Lúcia Rodrigues,

Thanks for reporting. I think I fixed it in the code attached. Apply over previous patches.

#28 Updated by Mischa The Evil 28 days ago

@Frederico: First, thank you for sharing your solution with the broader Redmine community. I think that this would be a good improvement to the Redmine core for instances (with projects) that use a larger amount of custom fields. I'm at the moment actually considering to start a new project which could really benefit from this feature.

I have had a quick look at your patches (more specifically: 0001-Add-Group-Issue-Custom-Fields-functionality.patch) and have some questions and remarks though:
  • How does the design of the implementation you've chosen for your patches compare to the design of the patch that is provided in #13839#note-8?
  • Did you choose the name groupissuescustomfields on purpose? Rails convention tends to lean more towards something like group_issues_custom_fields. I noticed that this seems a recurring theme with some more variables like tid, gid, cfid, gp, cfs, cfp, etc.
  • Where are full-width custom fields actually placed after your patch has been applied?
  • In which cases is the wiki formatting toolbar actually provided?
  • In the screenshots you've posted it looks like the right borders of field inputs are cutoff. I don't think that's intentional. Is this still present?
  • Do you see a way to extent this patch to also allow for grouping of default fields?
  • Can you update the patch to apply to the (current) trunk?
  • Can you confirm if the current test suite passes without failures/errors with your patch applied?
  • Can you provide (solid) test coverage for your changes (this would be required to get it integrated within the Redmine core)?

#29 Updated by Frederico Camara 27 days ago

Mischa The Evil wrote:

  • How does the design of the implementation you've chosen for your patches compare to the design of the patch that is provided in #13839#note-8?

I did not know about #13839#note-8 before writing my own. I downloaded #13839#note-8 and tried to apply it with Redmine stable from 3.0 to 4.2 but it shows errors. I have not tried to merge that patch. Just reading it, I noticed some differences:
Both patches do similar things, but there are differences:
#13839#note-8 saves changes as json to a new model, and there is no db migration code. Is it missing?
#13839#note-8 changes the layout and could insert blanks between fields. It does not group them. It has no full width code (maybe it's older then full width fields).
My patch (this one) is somewhat broader, it also works with pdf export and mail.
Neither patch seems to copy itself when copying a project (at least this doesn't).
I haven't seen how #13839#note-8 deals with adding/removing custom fields to/from a project/tracker.

  • Did you choose the name groupissuescustomfields on purpose? Rails convention tends to lean more towards something like group_issues_custom_fields. I noticed that this seems a recurring theme with some more variables like tid, gid, cfid, gp, cfs, cfp, etc.

No, it's plain inexperience with Rails convention. Easy fix, though.

  • Where are full-width custom fields actually placed after your patch has been applied?

What I do is mix them (full-width custom fields) inbetween two column fields. They interrupt the flow of two column fields, go full width, and then the flow continues.
I just didn't like full-width custom fields being at the bottom.

Let me give an ordered example, how it works (comma separated fields are full with when they end with a 'w')
Group A: f1, f2, f3w, f4, f5, f6, f7w, f8w f9; the layout would be:
Group A
f1 f2
f3w
f4 f6
f5
f7w
f8w
f9
  • In which cases is the wiki formatting toolbar actually provided?

As usual. If the formatting toolbar is set for the custom field, it shows above it, when editing the issue.

  • In the screenshots you've posted it looks like the right borders of field inputs are cutoff. I don't think that's intentional. Is this still present?

Could not reproduce it now. Maybe I fixed it after I took the screenshots, or the screenshots were (badly) edited for size. I can't recall, it was so long ago.

  • Do you see a way to extent this patch to also allow for grouping of default fields?

I never thought of that.
Custom fields's layout are a loop. I divide them in 3 categories: Redmine ordered, ordered but not grouped, grouped. I show these categories in that order.
Before layouting I know which custom fields would show.
Default fields code is different, the order and layout are hardcoded. I would have to break that into the layouting code, and the db layout points to the custom_field table.
Also, what if I add new fields to a project/tracker, should I put them at the end? If so I would have to mark they are ungrouped somehow, or else they would seem to be part of the last group.

  • Can you update the patch to apply to the (current) trunk?

Yes, if it doesn't already.

  • Can you confirm if the current test suite passes without failures/errors with your patch applied?

No, I can't. I use about a dozen plugins in production here, tests always fail. It may pass, I don't know if tests really care about the ordering of custom fields.

  • Can you provide (solid) test coverage for your changes (this would be required to get it integrated within the Redmine core)?

I don't know if I have the skill. Maybe, I can try.

#30 Updated by Lúcia Rodrigues 27 days ago

Frederico Camara wrote:

Lúcia Rodrigues,

Thanks for reporting. I think I fixed it in the code attached. Apply over previous patches.

Thank you Frederico for your quick support.
This fix works perfectly.

Also available in: Atom PDF