#13768 closed enhancement (fixed)
Make it compatible with TRAC 1.4+
Reported by: | Ricardo Piccini | Owned by: | Cauly |
---|---|---|---|
Priority: | normal | Component: | CategorizedFieldsPlugin |
Severity: | minor | Keywords: | |
Cc: | Trac Release: | 1.4 |
Description
Please, make this awesome plugin compatible with trac 1.4.
Attachments (9)
Change History (35)
comment:3 Changed 5 years ago by
Reporter: | changed from anonymous to Ricardo Piccini |
---|
comment:4 Changed 5 years ago by
comment:5 follow-up: 6 Changed 5 years ago by
Hi, please try https://github.com/trac-hacks/TracCategorizedFieldsPlugin/tree/trac1.4 and let me know if it works or not.
If you also need xmlrpc support for categorized fields, you should use the latest XMLRPC plugin from #13611
comment:6 follow-up: 7 Changed 5 years ago by
Replying to Cauly:
Hi, please try https://github.com/trac-hacks/TracCategorizedFieldsPlugin/tree/trac1.4 and let me know if it works or not.
If you also need xmlrpc support for categorized fields, you should use the latest XMLRPC plugin from #13611
Hi, tks for your effort, but when i install get this error:
ERROR: Could not find a version that satisfies the requirement TracCategorizedFieldsPlugin-trac1.4 (from versions: none) ERROR: No matching distribution found for TracCategorizedFieldsPlugin-trac1.4
comment:7 Changed 5 years ago by
Replying to Ricardo Piccini:
Hi, tks for your effort, but when i install get this error:
How did you install?
Try:
$ pip install git+https://github.com/trac-hacks/TracCategorizedFieldsPlugin.git@trac1.4
comment:8 Changed 5 years ago by
Tks, instalation works now, but show this warning on log and fields not categorized.
2020-03-31 20:11:36,190 Trac[chrome] WARNING: File js/dist/bundle.js not found in any of ['D:\\TRAC\\python\\lib\\site-packages\\CategorizedFields\\htdocs'] 2020-03-31 20:11:36,210 Trac[main] WARNING: [::1] HTTPNotFound: 404 Not Found (File js/dist/bundle.js not found), <RequestWithSession "GET '/chrome/CategorizedFields/js/dist/bundle.js'">, referrer 'http://localhost/trac/APIC/ticket/177'
I tried to copy this file from old package, but don't worked.
comment:9 Changed 5 years ago by
I using TicketGroupFields and works, but only when i need to create or modify a ticket...
For that i prefer this CategorizedFields.
comment:10 Changed 5 years ago by
Hi, I git-ignored this file by mistake and now it's fixed. Would you please give another try?
just run this again, and the version in admin/plugin should be 3.0.1
pip install git+https://github.com/trac-hacks/TracCategorizedFieldsPlugin.git@trac1.4
Changed 5 years ago by
Attachment: | chrome_cDOhH7s86J.png added |
---|
Changed 5 years ago by
Attachment: | chrome_K4kEo8W6Qf.png added |
---|
Changed 5 years ago by
comment:12 Changed 5 years ago by
comment:13 Changed 5 years ago by
TRAC.INI
[components] categorizedfields.categorizedfields = enabled categorizedfields.categorizedfields.categorizedfields = enabled categorizedfields.xmlrpc.categorizedfieldsrpc = enabled groupticketfields.ticket.groupticketfields = disabled [categorized-fields] catINCIDENTES = INCIDENTES catINCIDENTES.index = 1 [ticket-custom] analiseinicial = checkbox analiseinicial.label = Análise inicial analiseinicial.options = analiseinicial.order = 10 analiseinicial.value = analiseinicial.category = catINCIDENTES
DEPLOY
D:\TRAC\Python\Scripts>trac-admin "D:\Trac Stack projects\APIC" deploy "D:\TRAC\ apache2" Copiando recursos de: trac.web.chrome.Chrome d:\trac\python\lib\site-packages\trac\htdocs d:\trac stack projects\apic\htdocs acct_mgr.notification.AccountChangeNotificationAdminPanel d:\trac\python\lib\site-packages\acct_mgr\htdocs acct_mgr.web_ui.AccountModule d:\trac\python\lib\site-packages\acct_mgr\htdocs acct_mgr.admin.UserAdminPanel d:\trac\python\lib\site-packages\acct_mgr\htdocs acct_mgr.admin.ConfigurationAdminPanel d:\trac\python\lib\site-packages\acct_mgr\htdocs autocompleteusers.autocompleteusers.AutocompleteUsers d:\trac\python\lib\site-packages\autocompleteusers\htdocs awesome.awesomeattachments.AwesomeAttachments d:\trac\python\lib\site-packages\awesome\htdocs customfieldadmin.admin.CustomFieldAdminPage d:\trac\python\lib\site-packages\customfieldadmin\htdocs CategorizedFields.CategorizedFields.CategorizedFields d:\trac\python\lib\site-packages\CategorizedFields\htdocs tracdragdrop.web_ui.TracDragDropModule d:\trac\python\lib\site-packages\tracdragdrop\htdocs tracopt.ticket.clone.TicketCloneButton d:\trac\python\lib\site-packages\tracopt\ticket\htdocs tracopt.ticket.deleter.TicketDeleter d:\trac\python\lib\site-packages\tracopt\ticket\htdocs tracsubtickets.web_ui.SubTicketsModule d:\trac\python\lib\site-packages\tracsubtickets\htdocs tracwysiwyg.WysiwygModule d:\trac\python\lib\site-packages\tracwysiwyg\htdocs wikiautocomplete.web_ui.WikiAutoCompleteModule d:\trac\python\lib\site-packages\wikiautocomplete\htdocs Criando scripts.
TRAC VERSION
Pacote | Versão |
---|---|
Trac | 1.4.1 |
Babel | 2.8.0 |
Docutils | 0.16 |
Genshi | 0.7.3 (with speedups) |
Jinja2 | 2.11.1 |
mod_wsgi | 3.5 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL}) |
Pygments | 2.5.2 |
pysqlite | 2.6.0 |
Python | 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] |
pytz | 2019.3 |
setuptools | 41.2.0 |
SQLite | 3.28.0 |
Textile | 3.0.4 |
jQuery | 1.12.4 |
jQuery UI | 1.12.1 |
jQuery Timepicker | 1.6.3 |
BROWSER CONSOLE
Changed 5 years ago by
Attachment: | ShareX_j0P2d9F7F6.png added |
---|
comment:14 Changed 5 years ago by
Sorry, i'm not provide to you the right info.
When you commit this new version, I uninstall the previous version, but not delete the folder. So I unistall and reinstall again.
This cause some changes, but still not worked fine, in truth, it mess what working before and the other fields too.
I don't touch the configurations...
New Ticket
Display ticket before create
Modify ticket
Changed 5 years ago by
Attachment: | chrome_UjhFSIleo2.png added |
---|
Changed 5 years ago by
Attachment: | chrome_lTIdF2X6Zt.png added |
---|
Changed 5 years ago by
Attachment: | chrome_YYdaTeZ7tH.png added |
---|
comment:15 follow-ups: 17 19 Changed 5 years ago by
hi, I have reproduce your problem and it seems the category name cannot be capitalized.
This is a restriction by the way trac processes the config.
try config below:
[categorized-fields] cat_incidentes = INCIDENTES cat_incidentes.index = 1 [ticket-custom] analiseinicial = checkbox analiseinicial.label = Análise inicial analiseinicial.options = analiseinicial.order = 10 analiseinicial.value = analiseinicial.category = cat_incidentes
comment:16 follow-up: 18 Changed 5 years ago by
By the way, this plugin do NOT support category in new ticket page. If you feel it useful, please let me know.
comment:17 follow-up: 21 Changed 5 years ago by
Replying to Cauly:
hi, I have reproduce your problem and it seems the category name cannot be capitalized.
This is a restriction by the way trac processes the config.
try config below:
[categorized-fields] cat_incidentes = INCIDENTES cat_incidentes.index = 1 [ticket-custom] analiseinicial = checkbox analiseinicial.label = Análise inicial analiseinicial.options = analiseinicial.order = 10 analiseinicial.value = analiseinicial.category = cat_incidentes
OK, nice, it works now, tks a lot! But I still concern about the other fields that don't belong to the category that I create. It's not in the right order.
Screenshot from TRAC in production:
Screenshot from TRAC that i create for tests purpose:
Changed 5 years ago by
Attachment: | chrome_0RcBJx8tJm.png added |
---|
Changed 5 years ago by
Attachment: | chrome_C02GGMNy7p.png added |
---|
comment:18 Changed 5 years ago by
Replying to Cauly:
By the way, this plugin do NOT support category in new ticket page. If you feel it useful, please let me know.
It would be nice.
Very useful because we have some tickets with several stages until its end and we need this custom fields in wich stage there some reports to keep up the status that we can't do with comments because some people just see "the numbers", if you know what I mean.
comment:19 follow-up: 20 Changed 5 years ago by
Replying to Cauly:
This is a restriction by the way trac processes the config.
Python's ConfigParser has been case-insensitive for key names. We added case sensitive parsing to UnicodeConfigParser
in trac.config
in trac:r15845, but trac.env.config
is case-insensitive for backward compatibility (trac:#12649).
comment:20 Changed 5 years ago by
Replying to Ryan J Ollos:
Replying to Cauly:
This is a restriction by the way trac processes the config.
Python's ConfigParser has been case-insensitive for key names. We added case sensitive parsing to
UnicodeConfigParser
intrac.config
in trac:r15845, buttrac.env.config
is case-insensitive for backward compatibility (trac:#12649).
Thanks for the infomation
comment:21 follow-up: 23 Changed 5 years ago by
Replying to Ricardo Piccini:
Replying to Cauly:
hi, I have reproduce your problem and it seems the category name cannot be capitalized.
This is a restriction by the way trac processes the config.
try config below:
[categorized-fields] cat_incidentes = INCIDENTES cat_incidentes.index = 1 [ticket-custom] analiseinicial = checkbox analiseinicial.label = Análise inicial analiseinicial.options = analiseinicial.order = 10 analiseinicial.value = analiseinicial.category = cat_incidentesOK, nice, it works now, tks a lot! But I still concern about the other fields that don't belong to the category that I create. It's not in the right order.
Hi, sorry for the late reply. This plugin does not preserve the original order of fields. However, if you care about the order, you can hand edit the 'index' property in custom-fields, even the field does not belong to a category.
[ticket-custom] component.index=1 milestone.index=2 cc.index=3
comment:22 follow-up: 27 Changed 5 years ago by
if you do not have other bugs related to trac 1.4 port, please close this ticket. For other features and bugs, feel free to open another ticket. Thanks!
--by cauly
comment:23 Changed 5 years ago by
Replying to anônimo:
Replying to Ricardo Piccini:
Replying to Cauly:
hi, I have reproduce your problem and it seems the category name cannot be capitalized.
This is a restriction by the way trac processes the config.
try config below:
[categorized-fields] cat_incidentes = INCIDENTES cat_incidentes.index = 1 [ticket-custom] analiseinicial = checkbox analiseinicial.label = Análise inicial analiseinicial.options = analiseinicial.order = 10 analiseinicial.value = analiseinicial.category = cat_incidentesOK, nice, it works now, tks a lot! But I still concern about the other fields that don't belong to the category that I create. It's not in the right order.
Hi, sorry for the late reply. This plugin does not preserve the original order of fields. However, if you care about the order, you can hand edit the 'index' property in custom-fields, even the field does not belong to a category.
[ticket-custom] component.index=1 milestone.index=2 cc.index=3
You mean
[ticket-custom] component.order=1 milestone.order=2 cc.order=3
or
[categorized-fields] component.index=1 milestone.index=2 cc.index=3
?
comment:24 Changed 5 years ago by
hi,
in current version, this plugin do not preserve the original order, the 'order' attribute in ticket-custom does not work any more when categorized-ticket is enabled.
Instead, categorized-fields provides 'index' property in both [ticket-custom] section and [categorized-fields] section.
[ticket-custom] component.index=1 milestone.index=2 cc.index=3
This config defines the order of those fields in same category.
[categorized-fields] cate1.index=1 cate2.index=2 cate3.index=3
This config defines the order of the categories.
I noticed that it would be better to use 'order' property rather than 'index' property for better compabilitiy, so I will update this plugin very soon.
comment:25 follow-up: 28 Changed 5 years ago by
hi, I have changed the 'index' property to 'order' property. Now it looks like:
[ticket-custom] component.order=1 milestone.order=2 cc.order=3 [categorized-fields] cate1.order=1 cate2.order=2 cate3.order=3
Remove and reinstall the plugin to take effect. Make sure version is 3.1.0 after install.
comment:26 Changed 5 years ago by
Nice, I'll test it as soon as I have time.
Doubt: Is there any way to disable the plugin when I'm modifying the ticket? Since it has no effect on the new ticket, it would be better not to do it when I am modifying...
comment:27 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:28 Changed 5 years ago by
Replying to Cauly:
hi, I have changed the 'index' property to 'order' property. Now it looks like:
[ticket-custom] component.order=1 milestone.order=2 cc.order=3 [categorized-fields] cate1.order=1 cate2.order=2 cate3.order=3Remove and reinstall the plugin to take effect. Make sure version is 3.1.0 after install.
OK, well, I notice that "order" works, but fields that belong a categorie do not respect the order propertie.
After a quick glance at 1.4 I found it needs quite a lot work to migrate since the template engine has changed and I have to lean about the new one. It might take me a couple of days.