View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005744mantisbtcustom fieldspublic2005-06-08 11:242014-01-21 16:03
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005744: Managing custom fileds in the workflow
DescriptionWhen creating a custom field, I can say it is necessary reporting, updating, solving or closing an issue.

I would like, in manage_config_workflow_page.php, having a table like workflow.
One row for each custom field, one column by status. A checkbox saying : custom field necessary at this status

Would it be possible ?

Best, having "level access" by cutsom field saying by status the min threshold level allowed for updating the custom field...

Am I crazy ? ;-)
Attached Filespatch file icon mantis.patch [^] (26,005 bytes) 2007-07-26 20:08 [Show Content]
patch file icon mantisbt.patch [^] (41,332 bytes) 2007-07-27 01:46 [Show Content]
patch file icon mantisbt_2.patch [^] (27,515 bytes) 2007-07-27 11:52 [Show Content]
patch file icon mantisbt_3.patch [^] (23,541 bytes) 2007-07-27 18:31 [Show Content]
patch file icon mantisbt_4.patch [^] (25,132 bytes) 2007-07-27 20:53 [Show Content]
patch file icon mantisbt_5.patch [^] (37,460 bytes) 2007-07-29 01:10 [Show Content]
zip file icon [^] (66,792 bytes) 2009-05-28 12:27
zip file icon [^] (84,568 bytes) 2009-05-29 04:59

- Relationships
has duplicate 0009195closedatrol Display when Reporting, Resolving and Closing fields should be merged 
has duplicate 0013494closedatrol Allow configuration of which custom fields to display/require upon which status changes 
has duplicate 0013610closedatrol Allow configuration of which custom fields to display/require upon which status changes 
has duplicate 0012886closedatrol Mandatory Custom Status for Custom Fields 
has duplicate 0014758closedatrol Display / Require custom fileds when updating to a custom status 

-  Notes
User avatar (0010424)
thraxisp (manager)
2005-06-08 11:42

It was in my plans...
User avatar (0012722)
illes (reporter)
2006-04-25 11:27

Nice feature, I'm waiting for this one too.
User avatar (0015232)
roleary (reporter)
2007-07-26 20:08
edited on: 2007-07-26 20:22

I'm pretty much finished with a patch to implement this behavior. I need some guidance from the devs on how to handle upgrading from an older version to a version that supports this.

I've attached the current version of the patch. This patch allows you to specify, for each Custom Field, whether you would like that field Not Shown, Displayed, or Required for each Status. PATCH IS FOR 1.0.8

I believe I've covered all the bases here, but there are still some issues that need to be resolved. Mainly, I have not yet stripped the old "require_update", "display_update"... etc. and I have not implemented any sort of upgrade code.

If any of the devs could contact me, I would happy to work through my remaining issues and formally submit this, however that's done. I can update the code to patch to the latest version also.

User avatar (0015233)
roleary (reporter)
2007-07-27 01:47
edited on: 2007-07-27 11:52

Just uploaded new patch that will work on the current CVS repository.

Please use the latest patch above for 1.0.4a (mantisbt_2.patch). If someone can delete the other files, that would be great.

User avatar (0015247)
roleary (reporter)
2007-07-27 18:32


This patch contains the same functionality as "_2", but with the data stored in a list in a new column on the custom_field table instead of in a whole new table.
User avatar (0015249)
roleary (reporter)
2007-07-27 20:55
edited on: 2007-07-28 02:57


Contains additional fixes as discussed in IRC:

<roleary> Issue 0000001 - The viewing of the issue. The custom fields always show in that read-only 
view on top of the bug if they're assigned to the project. A couple ways to change that: either:
<roleary> a) leave as is
<roleary> b) only show when the field is "display" or "require" for the current 
<roleary> c) show when the field is "display" or "require" for any status <= 
the current status
<roleary> d) other ways?
<thraxisp> roleary: for 0000001, I like b. Display also needs to meet the read/write access levels.

User avatar (0015264)
grangeway (reporter)
2007-07-28 15:10

fwiw, assigned to myself as i'm trying to merge this with another patch.
User avatar (0015267)
roleary (reporter)
2007-07-29 01:23


This patch includes removal of all references to the old "display_" and "require_" values for custom fields.

Also, this patch includes a new function in admin/install.php that will migrate the existing custom field data. This new function (migrateCustomFieldDisplay()) must be called AFTER the patch has been applied to PHP files and AFTER the new field has been added to the custom_field table, but BEFORE the old fields in the custom_field table have been removed. This function is currently not called anywhere (waiting on help from thraxisp here), but I have tested it to make sure it works.

Additionally, there are some outstanding issues I am waiting for guidance on:
1) I only updated lang/string_english.txt, not any other language. Should I make the change to all files and leave the values blank?
2) I updated the API code accordingly, but currently it will return the serialized array as a string for the new field in custom_field. Not sure if that's the correct way to handle serialized data. Does the serialized array need to be unserialized and returned value-by-value? Or just as a string?
3) Do I need to do anything with admin/upgrades files? I'm not quite sure what their purpose is or how to go about creating an upgrade file for the changed schema.
User avatar (0015270)
vboctor (administrator)
2007-07-29 03:18

A quick answer to your localization question. You only need to update strings_english.txt. Any string that is not in the current language will be defaulted to the English string.

It would be great if we can create a requirements wiki page that explains what this feature achieves and possible includes screen captures. This will make it easier to review the feature on high level. This will also be a good starting point for the feature documentation.

Browse through the requirements section in the Wiki to get an idea of what I mean: [^]
User avatar (0015279)
roleary (reporter)
2007-07-29 17:17

Create a requirements page on the wiki per vboctor's request: [^]
User avatar (0015285)
illes (reporter)
2007-07-30 03:49

Nice documentation, thanks, I can only agree with that.
User avatar (0015296)
emathieu (reporter)
2007-07-30 09:27

Could be a good idea to expand it to default fields.

In the requirements page, can you explain what is exactly the meaning of "None" and "Display"
User avatar (0015659)
malaussena (reporter)
2007-09-18 12:26

I have only one thing to say (as the reporter)… very good work !

I hope to see leaving version 1.2.0 very quickly!
User avatar (0021959)
cbasset (reporter)
2009-05-28 12:32

I've upload a new patch for the following reasons:
- it fixes an issue in the view bug page
- it adds possible workarounds for update as displaying fields depending on current status might be an issue if the update includes a status change.
- it is more convenient to apply to current release

See readme.txt file included in the zip for more informations.
User avatar (0021966)
cbasset (reporter)
2009-05-29 05:00

Upload v2 version of patch, lang file was missing in first upload.
User avatar (0022190)
Jheredero (reporter)
2009-06-18 04:46
edited on: 2009-06-18 04:50


I have installed the pacth, it is very interesting, but I have a grant problem, when I reported a issue (status NEW), the values of the custom fields don´t record (are defined how required), In the other status and when it is recorded and updated work perfectly. do you know which can to be the reason?.
The only thing that no work of steps of the path documentation is the drop the constraints, these dont work but i undertand that isn´t the reason because in the other status work good.

Thank you and sorry for my english.

User avatar (0023047)
costinnila (reporter)
2009-10-01 08:27

There is a problem in bug_update.php at line 129.
No $ sign in front of t_field_value. Because of this the required fields are not checked properly.
User avatar (0026015)
serom (reporter)
2010-07-02 04:15

I'm having problems with this patch in Mantis 1.2.1. Is there a new patch for the latest version of mantis?
User avatar (0028207)
irineus (reporter)
2011-02-11 10:28

It seems this patch doesn't work anymore with newer version (1.2.0 and up). There's any directions to do this in these new versions?
User avatar (0031178)
illes (reporter)
2012-02-07 05:12

Any update on the status of this issue?
User avatar (0039117)
atrol (developer)
2014-01-21 16:03

Unassigned after having been assigned for a long time without progress.

- Issue History
Date Modified Username Field Change
2005-06-08 11:24 malaussena New Issue
2005-06-08 11:42 thraxisp Note Added: 0010424
2005-06-08 11:42 thraxisp Status new => acknowledged
2005-06-08 11:43 thraxisp Relationship added child of 0005410
2006-04-25 11:27 illes Note Added: 0012722
2007-07-08 19:20 vboctor Relationship deleted child of 0005410
2007-07-08 19:20 vboctor Product Version CVS HEAD =>
2007-07-08 19:20 vboctor Target Version => 1.2.0
2007-07-26 20:08 roleary Note Added: 0015232
2007-07-26 20:08 roleary File Added: mantis.patch
2007-07-26 20:22 roleary Note Edited: 0015232
2007-07-27 01:46 roleary File Added: mantisbt.patch
2007-07-27 01:47 roleary Note Added: 0015233
2007-07-27 11:52 roleary Note Edited: 0015233
2007-07-27 11:52 roleary File Added: mantisbt_2.patch
2007-07-27 18:31 roleary File Added: mantisbt_3.patch
2007-07-27 18:32 roleary Note Added: 0015247
2007-07-27 20:53 roleary File Added: mantisbt_4.patch
2007-07-27 20:55 roleary Note Added: 0015249
2007-07-28 02:57 giallu Note Edited: 0015249
2007-07-28 10:37 grangeway Status acknowledged => assigned
2007-07-28 10:37 grangeway Assigned To => grangeway
2007-07-28 15:10 grangeway Note Added: 0015264
2007-07-29 01:10 roleary File Added: mantisbt_5.patch
2007-07-29 01:23 roleary Note Added: 0015267
2007-07-29 03:18 vboctor Note Added: 0015270
2007-07-29 17:17 roleary Note Added: 0015279
2007-07-30 03:49 illes Note Added: 0015285
2007-07-30 09:27 emathieu Note Added: 0015296
2007-09-18 12:26 malaussena Note Added: 0015659
2008-04-18 12:46 vboctor Tag Attached: patch
2008-07-12 18:19 giallu Target Version => 1.2.0
2009-05-04 14:27 siebrand Target Version 1.2.2 => 1.x.x
2009-05-28 12:27 cbasset File Added:
2009-05-28 12:32 cbasset Note Added: 0021959
2009-05-29 04:59 cbasset File Added:
2009-05-29 05:00 cbasset Note Added: 0021966
2009-06-18 04:46 Jheredero Note Added: 0022190
2009-06-18 04:50 Jheredero Note Edited: 0022190 View Revisions
2009-10-01 08:27 costinnila Note Added: 0023047
2010-07-02 04:15 serom Note Added: 0026015
2011-02-11 10:28 irineus Note Added: 0028207
2011-07-24 05:04 atrol Relationship added has duplicate 0009195
2011-11-08 07:09 atrol Relationship added has duplicate 0013494
2012-02-07 05:12 illes Note Added: 0031178
2012-10-05 16:29 atrol Relationship added has duplicate 0012886
2012-10-05 16:31 atrol Relationship added has duplicate 0014758
2014-01-21 16:03 atrol Note Added: 0039117
2014-01-21 16:03 atrol Assigned To grangeway =>
2014-01-21 16:03 atrol Status assigned => new
2014-01-21 16:03 atrol Target Version 1.3.x =>

MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.2064 seconds.
memory usage: 3,426 KB
Powered by Mantis Bugtracker