View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005278 | mantisbt | custom fields | public | 2005-02-24 11:30 | 2022-12-25 05:29 |
Reporter | HeikoNorderstedt | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0005278: custom field for user accounts | ||||
Description | We made several changes to use the custom fields for the user accounts as well. To use the fields they have to be added in the "Manage Users" section. The value of the custom field from the user account (from every single user) will be copied into the custom field in the report page. We use this for example to fill out the telephone number from our costumers. To store the values of the user custom fields we need two new database tables: To use the extension you have to execute the upgrade script in the admin directory of mantis. | ||||
Tags | No tags attached. | ||||
Attached Files | 0_19_user_custom_fields.php (1,483 bytes)
<?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org # Copyright (C) 2002 - 2004 Mantis Team - mantisbt-dev@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # Changes applied to 0.18 database # -------------------------------------------------------- # $Id: 0_19_inc.php,v 1.1 2004/10/05 17:20:33 thraxisp Exp $ # -------------------------------------------------------- ?> <?php require_once( 'db_table_names_inc.php' ); $upgrades = array(); $upgrades[] = new SQLUpgrade( '0.19.1.user_custom.1', 'Add User_Custom_Field_Table', "CREATE TABLE $t_custom_field_user_table ( field_id int NOT NULL default '0', sequence int NOT NULL default '0', PRIMARY KEY (field_id))" ); $upgrades[] = new SQLUpgrade( '0.19.1.user_custom.2', 'Add User_Custom_Field_String_Table', "CREATE TABLE $t_custom_field_user_string_table ( field_id int NOT NULL default '0', user_id int NOT NULL default '0', value varchar(255) NOT NULL default '', PRIMARY KEY (field_id,user_id))" ); $upgrades[] = new SQLUpgrade( '0.19.2.user_custom.3', 'Add field User_Custom_Field_Table', "ALTER TABLE $t_custom_field_table ADD `access_level_rwc` INT(2) UNSIGNED DEFAULT \"0\" NOT NULL" ); return $upgrades; ?> | ||||
has duplicate | 0006075 | closed | atrol | Exrta Fields in user info |
has duplicate | 0011377 | closed | atrol | The "My Account" should have the "Custom Fields" function |
has duplicate | 0015457 | closed | atrol | Additional user information |
has duplicate | 0026595 | closed | atrol | Users |
has duplicate | 0027588 | closed | atrol | Add custom field to user profile |
related to | 0006388 | new | Custom fields for notes | |
related to | 0003481 | new | Complex Profiles: Add firstname, last name, phone numbers, and other email fields | |
child of | 0005650 | acknowledged | Investigate/Implement Enhanced Custom Field support |
Do you have that zip handy in form of a diff at all? Paul |
|
Sorry, I only have the zip file with the changed and new sources. I am not so familar with cvs to produce diff files, but the changes all base on the 0.19.2 Release Version of mantis. Heiko |
|
Is this being worked? I see the last comment was two years ago. I'm very interested in this feature and would be willing to work on it if needed. The attachments are missing and I'm wondering if there are any design specs for the feature. |
|
Yes it's working. We added the changes on the 1.0.5 release of mantis. If you are interested, i can upload the changed sources in the next days. What do you mean with "design specs"? The features of the modification are:
|
|
Great. I'm keeping my code synced with cvs but I don't see anything related to this. Is it in CVS yet or just patched to a release? If it's already in there how do I configure it? I don't seem to be able to find it. If it isn't there, yes I would certainly be interested in the source changes. In regard to design specs, I was just wondering if there was any documentation specifying how this should be implemented. Your explanation below is helpful. Thanks for the speedy response! Daryn |
|
@daryn |
|
I'm having trouble with the db update. I tried to run the admin/update script and several things were updated but the user custom fields were not. I don't see them in the update scripts either... |
|
@daryn |
|
@Heiko I must be doing something wrong because I still am unable to get this to work. I appear to be missing the file upgrades/0_19_user_custom_fields.php. Is there a better way to discuss this? IRC?, Skype? Other? |
|
@daryn |
|
@grangeway |
|
I deleted mantis_usercustomfields.zip. |
|
I think the ability to have a custom field of type User still has strong value, as you can then create fields such as Tester etc. With current Mantis the testing team try to assign issues to themselves which breaks the developer-based statistics. It'd be ideal to provide a custom field that they can incorporate into their workflow. |
|
Hi, I use Mantis 1.2.2. Can anybody advice (step by step) how to install the User Custom fields functionality? |
|
Hi, I upgraded Mantis to version 1.2.5. Can anybody advice (step by step) how to install the User Custom fields functionality? |
|
Hi rtartas, the modified Mantis source code is based on version 1.05. It will not work on version 1.25. We also plan to upgrade our mantis installation in the near future. If there is still interest in our modifications, we can upload a new version then. |
|
Hi Heiko, Yes, I'm still interested in this modification. So if you could upgrade this and upload this here - I'll be very happy! Thank you! |
|
Hello, This seems like a really nice feature to have. Will this customization be upgraded to work with the 1.2.x code? Thank you, |
|
Hello mach825, currently we are running version 1.2.11 of mantis. I handed over then development of our mantis installation to our working student. We made several changes to the original code. We have to seperate these changes before we can upload the necessary code for the custom fields. This will take a while. :-) |
|
This should be a plugin, would make life much easier |
|
Hi, |
|
@Jo |
|
@HeikoNorderstedt |
|
@Jo |
|
sorry but I still don't understand how to add this "custom user fields" feature to mantis |
|
I would like to ask about the plugin you were talking about, is it ready? can you kindly share it with us? |
|
@mohamedh |
|
Thanks a lot for taking time to reply, I can wait a little longer, no problem. I didn't mean to bother you by asking, by I was just curious to know more about the current state of the plugin. |
|
@mohamedh |
|
THx alot thanks again for the plugin, it's working very good, btw if you're planning to release it for public I can offer to translate it to Arabic, French and maybe Spanish and Turkish(my Turkish and Spanish aren't good enough though) |
|
@mohamedh If you like you can upload your translations here. We could add a polish language file. Thanks for your responds. |
|
We generally don't recommend altering MantisBT core, but I don't think there's an official policy against hosting a plugin that does in the mantisbt-plugins organization on github. That being said, I would at least ask you to make this source code change explicit in the readme file, and also draw your attention to the fact that it is your responsibility to support such changes. Please refer to https://www.mantisbt.org/wiki/doku.php/mantisbt:mantis_plugins for the process to publish a plugin. |
|
I have a question,is it possible to make the new custuom field visible in the "view_user_page.php" |
|
@mohamedh |
|
Attached is the Arabic translation for your plugin, feel free to use it and insert in your next release "Yes it is possible, but it is not impelemented" so In order to remove this warning (optional) we needed to hack this file "acf_api.php"(plugin file, located at AccountCustomFields/pages/acf_api.php) If someone is interested I can upload the modified files. MantisBT is very awesome and easy to customize , however it still lacks a lot of feature, specially basic ones that should exist, for example custom user fields, I think it's something that Must be available by default, with the plugin/codes being provided now thanks to HeikoNorderstedt I would like to ask if you can implement it in your future releases, also adding some nice features like private messages, ability to customize the summary page..etc would be awesome... strings_arabic.txt (1,837 bytes)
<?php # General $s_plugin_AccountCustomFields_custom_field = 'حقل'; $s_plugin_AccountCustomFields_sequence = 'تسلسل'; $s_plugin_AccountCustomFields_rwc = 'تعديل صلاحات الدخول'; $s_plugin_AccountCustomFields_actions = 'تطبيق تصرف'; $s_plugin_AccountCustomFields_save_settings = 'حفظ الإعدادات'; $s_plugin_AccountCustomFields_cancel_import = 'إيقاف الإستيراد'; # Config Page $s_plugin_AccountCustomFields_config_page_title = 'الحقول الإختيارية (للحسبابات): صفحة الإعدادات'; $s_plugin_AccountCustomFields_uninstall_page_title = 'الحقول الإختيارية (للحسبابات): إلغاء التنصيب'; $s_plugin_AccountCustomFields_form_title_acf = 'الحقول الإختيارية للعضو'; $s_plugin_AccountCustomFields_no_acfs_in_use = 'لا يوجد أي حقول إختيارية مستخدمة كحقول إختيارية للأعضاء حتى الآن.'; # Config Values $s_plugin_AccountCustomFields_global_settings = 'خيارات العامة للإضافة'; $s_plugin_AccountCustomFields_conf_auto_load_string = 'إبلاغ عن حالة: استخدام قيم الحقل الإختياري للحسابات للحقول الإختيارية'; # Datasets $s_plugin_AccountCustomFields_datasets = 'datasets:'; $s_plugin_AccountCustomFields_datasets_active = ' المستخدم'; $s_plugin_AccountCustomFields_datasets_complete = ' الإجمالي'; # Schema $s_plugin_AccountCustomFields_schema_uninstall_message = 'أي قواعد بيانات تريدها أن تحذف؟ <br/> تم إلغاء التنصيب بنجاح.'; $s_plugin_AccountCustomFields_schema_uninstall_0 = 'لا تحذف أي شيء'; $s_plugin_AccountCustomFields_schema_uninstall_1 = 'حذف هياكل القواعد والبيانات'; |
|
@mohamedh |
|
I have attached it, credits goes to themadmaxboy |
|
Just started minor changes to @HeikoNorderstedt work => it rocks!!! |
|
Here Answer I've got:
Then I'm going to start working on a repo |
|
@fman, as mentioned earlier, please refer to https://www.mantisbt.org/wiki/doku.php/mantisbt:mantis_plugins for the process to publish a plugin. |
|
Good morning, is there a version of this plugin suitable for the current version of Mantis? |
|
I also need same thing. Is there new versiyon? MantisBT Version 2.20.0 |
|
Looks like @fman never got very far with creating the plugin - as I write this https://github.com/fmancardi/AccountCustomFields has only one initial commit with a readme file. Or maybe he never pushed his changes to GitHub. |
|
@dregad: I'm sorry for never finishing the work. My experience is that is much better if you have minimum PHP development knowledge to develop a plugin. I've followed this path to create a RACIMatrix Plugin. regards |
|
No worries, my comment was not meant to put pressure or anything, I was just stating the fact that there was no actual code in the repo, and maybe you had forgotten to push it. The rest of your answer is somewhat confusing, I'm not sure I get your point... What does your experience, PHP knowledge or the RACIMatrix plugin have to do with this (assuming you mean https://github.com/fmancardi/RACIMatrixAssignment) |
|
@dregad |
|
Any update for a Mantis 2x version? This functionality would be great to have on Mantis. |
|
Hello, |
|
@lekankou maybe you should coordinate with @fman, who said a couple years ago that he was going to perform the upgrade (see 0005278:0058538), but he never came back with the outcome, so I don't know if he completed the work or not. When you have the code ready, let me know so it can be published on GitHub mantisbt-plugins organization (read https://www.mantisbt.org/wiki/doku.php/mantisbt:mantis_plugins). |
|
I am actually amazed such a basic thing was never even added to MantisBT core! despite having few contributions already that could help as a start. @dregad |
|
Thank you Mohamed for adding your note. I agree, this functionality should be built into the application and not partly in a plugin with basic pages to be manually edited on another part. hopefully soon @dregad, I understand that @fman wanted to create a new plugin. I just want to make a new version of the one I use to use actually. |
|
I believe he was intending to upgrade Heiko's AccountCustomFields plugin like you, not writing a new plugin, but I may be mistaken. Maybe he'll care to comment. Anyway, if you do the upgrade, let me know. As for this not being integrated into Core for 17 years, @mohamedh please keep in mind this is an open-source project maintained by people like me, on their spare time. If you really want / need something, please consider contributing, complaining does not help. |
|
IDK if you misunderstood me or you're twisting things and reading beyond what is written. I did not complain+ I fail to see any of my words where I complain, and I obviously and clearly stated my amazement "I am amazed" and I very clearly asked: "won't the wise solution be to simply... INTEGRATE". I did not ask you to write this feature for me, nor spend your time on it, I do understand it's free, open source, spare time, etc, All I asked is if it would be wiser to add it to core directly instead of quick'n dirty patches or plugins. Taken out of context, as you did, yes, ofc I am a rude person bossing people around, but put back in context, I clearly said "despite having few contributions already that could help as a start."
In 2015, when HeikoNorderstedt generously shared his modification, I also shared my modifications (c51002) for what I wanted (make fields visible) based on his work, so yeah when I needed something, I did it when I could. Back then you only stepped in to advise against modifying core files. Even as a plugin, this would still modify core files. Had this mod been integrated into core back then we wouldn't be having this conversation and the issue would be closed and things would be simpler to maintain imho. That's simply what I meant, put back into context, and even better, into full context (up to 2015), this modifies core, which is not good practice and you complained about it (a totally valid complaint tbh), which is why I simply asked if it is simpler to [b]integrate[/b] to core given the demand. Tl;dr let me rephrase my question maybe this time it will be clearer: |
|
So not in core but there is hope. I created a small plugin called Userdata which will do the trick, at least for most people. |
|
Thanks for taking the time to share this with us. I appreciate your time and efforts! Haven't been a mantis user lately, but I will definitely spin an instance and get back to you if I have any comments. I still stand by my question from 0067209, to those who are in a position to answer and approve PRs (dregad, vbcotor, or atrol) wouldn't it be wise to add such plugin as core later on? or is there any reason to avoid it? (especially since custom form fields are already core). |
|
@mohamedh, I am sure we love to have much more in core but it would differ a lot on what depending whom you ask the question. For me plugins are a very acceptable alternative but then actual plugins Quite happy to debate but do not think this is the right place. You will find my email inside the plugin. I took a different approach here opposite custom fields since in my view that would be overkill. Now you can define up to 100 fields which you can fill for each user. Also overkill since you only need a few ( I would hope ). Optional you can change 2 core scripts to keep all nicely in sync (all about removing plugin data once an user is deleted) but for those who do not like that, I included a manual option ( you do not delete users every day any way). |
|
@cas It seems it is not really related or similar to what is being discussed here We can discuss that in the forum. Once again thanks for sharing it and for the effort |
|
The plugin has reached its final state, version 2.05, and is available through the forum |
|