Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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)

chrome_cDOhH7s86J.png (25.9 KB) - added by Ricardo Piccini 5 years ago.
chrome_K4kEo8W6Qf.png (24.8 KB) - added by Ricardo Piccini 5 years ago.
1.jpg (282.2 KB) - added by Cauly 5 years ago.
ShareX_j0P2d9F7F6.png (40.0 KB) - added by Ricardo Piccini 5 years ago.
chrome_UjhFSIleo2.png (24.3 KB) - added by Ricardo Piccini 5 years ago.
chrome_lTIdF2X6Zt.png (27.3 KB) - added by Ricardo Piccini 5 years ago.
chrome_YYdaTeZ7tH.png (33.4 KB) - added by Ricardo Piccini 5 years ago.
chrome_0RcBJx8tJm.png (37.2 KB) - added by Ricardo Piccini 5 years ago.
chrome_C02GGMNy7p.png (33.8 KB) - added by Ricardo Piccini 5 years ago.

Download all attachments as: .zip

Change History (35)

comment:3 Changed 5 years ago by Ryan J Ollos

Reporter: changed from anonymous to Ricardo Piccini

comment:4 Changed 5 years ago by Cauly

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.

comment:5 Changed 5 years ago by 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

comment:6 in reply to:  5 ; Changed 5 years ago by Ricardo Piccini

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 in reply to:  6 Changed 5 years ago by Ryan J Ollos

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 Ricardo Piccini

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 Ricardo Piccini

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 Cauly

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 Ricardo Piccini

Attachment: chrome_cDOhH7s86J.png added

Changed 5 years ago by Ricardo Piccini

Attachment: chrome_K4kEo8W6Qf.png added

comment:11 Changed 5 years ago by Ricardo Piccini

Just view ticket works fine:

but in edit, don't:

Changed 5 years ago by Cauly

Attachment: 1.jpg added

comment:12 Changed 5 years ago by Cauly

Hi, since I can't reproduce your problem in my environment, more details are appreciated.

  1. Your trac version
  2. Any error in chrome develop console (F12, refresh the page, and see if something useful in image below)

comment:13 Changed 5 years ago by Ricardo Piccini

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 Ricardo Piccini

Attachment: ShareX_j0P2d9F7F6.png added

comment:14 Changed 5 years ago by Ricardo Piccini

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

Last edited 5 years ago by Ricardo Piccini (previous) (diff)

Changed 5 years ago by Ricardo Piccini

Attachment: chrome_UjhFSIleo2.png added

Changed 5 years ago by Ricardo Piccini

Attachment: chrome_lTIdF2X6Zt.png added

Changed 5 years ago by Ricardo Piccini

Attachment: chrome_YYdaTeZ7tH.png added

comment:15 Changed 5 years ago by 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

comment:16 Changed 5 years ago by Cauly

By the way, this plugin do NOT support category in new ticket page. If you feel it useful, please let me know.

comment:17 in reply to:  15 ; Changed 5 years ago by 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_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:

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

Changed 5 years ago by Ricardo Piccini

Attachment: chrome_0RcBJx8tJm.png added

Changed 5 years ago by Ricardo Piccini

Attachment: chrome_C02GGMNy7p.png added

comment:18 in reply to:  16 Changed 5 years ago by Ricardo Piccini

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 in reply to:  15 ; Changed 5 years ago by 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 in trac.config in trac:r15845, but trac.env.config is case-insensitive for backward compatibility (trac:#12649).

comment:20 in reply to:  19 Changed 5 years ago by anonymous

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 in trac.config in trac:r15845, but trac.env.config is case-insensitive for backward compatibility (trac:#12649).

Thanks for the infomation

comment:21 in reply to:  17 ; Changed 5 years ago by anonymous

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_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.

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 Changed 5 years ago by anonymous

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

Last edited 5 years ago by Cauly (previous) (diff)

comment:23 in reply to:  21 Changed 5 years ago by anonymous

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_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.

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 Cauly

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 Changed 5 years ago by 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=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 Ricardo Piccini

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 in reply to:  22 Changed 5 years ago by Ricardo Piccini

Resolution: fixed
Status: newclosed

Replying to anônimo:

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

OK! tks for all time spend with me.

comment:28 in reply to:  25 Changed 5 years ago by anonymous

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=3

Remove 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Cauly.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.