Modify

Opened 5 years ago

Closed 5 years ago

#13609 closed defect (fixed)

Set ticket field not working

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Andreas Trac Release: 1.2

Description (last modified by Ryan J Ollos)

with the current trunk version (2.3.0.dev0), the set function is not working on Trac 1.2.2

Examples:

project.set_to_!_when_type = Defect
project.set_to_Customer1_when_type = Defect
servicemanager.set_to_!_when_project = Customer1

Attachments (1)

2019-09-25_19-54-23.mp4 (511.1 KB) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 5 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 5 years ago by Ryan J Ollos

Status: newaccepted

comment:3 Changed 5 years ago by Ryan J Ollos

Priority: highnormal
Severity: criticalnormal

comment:4 Changed 5 years ago by Ryan J Ollos

In 17502:

TracDynamicFields 2.3.0dev: Fix scripts not added if default handler is ticket or query

Refs #13609.

comment:5 Changed 5 years ago by Ryan J Ollos

Do you have TimingAndEstimationPlugin installed? I'm committing a fix for a compatibility problem. Please try the latest.

If it still fails:

  1. Check the console
  2. Please share your entire [ticket-custom] section
  3. Please list all your installed plugins
Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:6 Changed 5 years ago by Ryan J Ollos

In 17503:

TracDynamicFields 2.3.0dev: Fix exception when element doesn't have id attribute

This occurred for TimingAndEstimationPlugin's hidden
field_totalhours field.

Refs #13609.

comment:7 Changed 5 years ago by anonymous

Sorry for the late reply. Unfortunately, the latest version didn't fix the problem, and TimingAndEstimationPlugin is not installed:

[ticket-custom]
estimatedhours = text
estimatedhours.label = Estimated Hours
estimatedhours.value = 0
keywords.hide_always = true
klstime = time
klstime.format = date
klstime.label = Implementation until
milestone.hide_when_project = Customer 1|Customer 2|Customer 3
parent = text
parent.format = wiki
parent.label = Parent ID
project = select
project.label = Customer
project.options = Customer0|Customer 1|Customer 2|Customer 3
project.set_to_!_when_type = Defect
component.set_to_Visicon_when_project = Customer 1|Customer 2|Customer 3
component.hide_when_project = Customer 1|Customer 2|Customer 3
component.clear_on_hide = false
parent.hide_when_project = Customer 1|Customer 2|Customer 3
servicemanager = select
servicemanager.label = Service Manager
servicemanager.options = |Person1|Person2|Person3
servicemanager.show_when_project = Customer0
totalhours = text
totalhours.label = Total Hours
totalhours.value = 0

The following plugins are installed:

ComponentDependencyPlugin	0.1
OverlayView	0.12.0.3
SimpleMultiProject	0.5.2
TicketSidebarProvider	0.0.post0
TracAccountManager	0.5.dev0
TracAutocompleteUsersPlugin	0.4.4.dev0
TracAwesomeAttachments	0.4.dev0
Tracchildtickets	2.5.6.dev0
TracDragDrop	0.12.0.14
TracDynamicFields	2.3.0.dev0
TracHours	0.7.3.dev0

comment:8 Changed 5 years ago by Ryan J Ollos

Any errors in the console?: Check the console

Please try disabling all those plugins except TracAccountManager, check if TracDynamicFields works; if yes enabled one plugin and test , repeating until you find the plugin that conflicts with TracDynamicFields.

comment:9 Changed 5 years ago by anonymous

I have deactivated all plugins except for the TracAccountManager and of course TracDynamicFields.

After deactivating the plugins and without changing anything else, it doesn't work either, but I found it has something to do with capital and small letters. When I only use small letters instead of small and big ones in the select-list, it works.

Customer0|Customer2 --> not working customer0|customer1 --> more or less working (see below)

project = select
project.label = Customer
project.options = |customer1|customer2|customer3
project.set_to_!_when_severity = Urgent

-->customer1 gets selected

But there is still a problem: when customer1 gets automatically selected, the list for some fields stays empty and only after a few clicks on the selection field (like 5-6 times), the options for selection appears.

So still two problems: Case sensitive writing & the dropdown-list is empty at the beginning (sometimes).

I will try to view the console later.

comment:10 in reply to:  9 Changed 5 years ago by Ryan J Ollos

Replying to anonymous:

When I only use small letters instead of small and big ones in the select-list, it works.

This is due to r16413 / #13099. I'm testing a fix.

Changed 5 years ago by anonymous

Attachment: 2019-09-25_19-54-23.mp4 added

comment:11 Changed 5 years ago by anonymous

Sorry, it was my fault, SimpleMultiProject in version 0.6.0.dev0 was still active when I tested everything.

Now I really deactivated it, and it immediately shows me the milestones etc., so it seems to conflict with SimpleMultiProject

I've just added a short video to demonstrate the problem. I always have to click / enter something, and then a few seconds later it appears, but it should actually appear immediately as it does without SimpleMultiProject. Also the console doesn't show any errors.

comment:12 Changed 5 years ago by Andreas

Cc: Andreas added

comment:13 Changed 5 years ago by Ryan J Ollos

In 17526:

TracDynamicFields 2.3.0dev: Account for all option names converted to lowercase

This should resolve issues introduced in r16413.

Refs #13099, #13609.

comment:14 in reply to:  11 ; Changed 5 years ago by Ryan J Ollos

Replying to anonymous:

I've just added a short video to demonstrate the problem. I always have to click / enter something, and then a few seconds later it appears, but it should actually appear immediately as it does without SimpleMultiProject. Also the console doesn't show any errors.

Thanks for the video. I will test with SimpleMultiProjectPlugin in the coming days.

There are some recent changes (see #9606). Please update to r17526 and retest. It probably won't make a difference on the SimpleMultiProject issue, but would be good if you could confirm the fix in r17526.

comment:15 in reply to:  13 Changed 5 years ago by Andreas

Replying to Ryan J Ollos:

In 17526:

TracDynamicFields 2.3.0dev: Account for all option names converted to lowercase

This should resolve issues introduced in r16413.

Refs #13099, #13609.

Unfortunately, it doesn't fix the case sensitive issue (I've tested with SimpleMultiProjectPlugin activated and also deactivated, both not working) - it does still only work with lowercase fields

comment:16 in reply to:  14 Changed 5 years ago by Andreas

Replying to Ryan J Ollos:

Thanks for the video. I will test with SimpleMultiProjectPlugin in the coming days.

There are some recent changes (see #9606). Please update to r17526 and retest. It probably won't make a difference on the SimpleMultiProject issue, but would be good if you could confirm the fix in r17526.

I can confirm that this also has no inpact on the rendering speed with SimpleMultiProjectPlugin activated - it still takes a few seconds to show the options with the latest version r17526 (like in the video)

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

comment:17 Changed 5 years ago by Ryan J Ollos

You likely have an installation problem. Make sure to redeploy static assets (TracPlugins#Redeployingstaticresources), if necessary for your configuration, and do a hard-refresh of the browser.

Another confirmation step you can do is to check the JavaScript source links in the browser and confirm the files contain recent changes, like those in r17526.

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

comment:18 Changed 5 years ago by Andreas

Thanks for this hint, redeployment has solved the case sensitive issue! (rendering speed with SimpleMultiProjectPlugin is still slow)

comment:19 Changed 5 years ago by Ryan J Ollos

What is your [simple-multi-project] configuration?

Are you running the latest (r17501) version of SimpleMultiProject?

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

comment:20 in reply to:  18 ; Changed 5 years ago by Ryan J Ollos

Replying to Andreas:

(rendering speed with SimpleMultiProjectPlugin is still slow)

It looks to be a different issue than the performance problem in #9606. The behavior shown in the video looks like a delayed event, or delayed execution of a document-ready handler.

Does the behavior occur if only SimpleMultiProject (and TracAccountManager) is enabled?

comment:21 in reply to:  20 ; Changed 5 years ago by Andreas

Replying to Ryan J Ollos:

Are you running the latest (r17501) version of SimpleMultiProject?

Just to make sure, I have just downloaded and installed the latest source code (and did the redeployment), which has the filename "simplemultiprojectplugin-17531.zip", so I guess r17501 might be included?! --> still the same behaviour

Replying to Ryan J Ollos:

What is your [simple-multi-project] configuration?

as far as I remember, I haven't changed anything here:

[simple-multi-project]
milestone_without_project = disabled
roadmap_data_filters = SmpRoadmapGroup,SmpRoadmapProjectFilter
roadmap_data_provider = SmpVersionProject,SmpRoadmapGroup,SmpRoadmapProjectFilter
single_project_milestones = disabled
single_project_versions = disabled
version_without_project = disabled

Replying to Ryan J Ollos:

Does the behavior occur if only SimpleMultiProject (and TracAccountManager) is enabled?

Well, the DynamicFieldsPlugin (and TracAccountManager) is enabled too. When I then deactivate SimpleMultiProject, it works as it should.

The problem seems to appear because of an interference with this setting:

[ticket-custom]
project.set_to_!_when_type = Defect

When I deactivate this and create a new ticket, the project-field is obviously not selected. When I then select a project manually, the milestone etc. immediately appears as they should.

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

comment:22 in reply to:  21 Changed 5 years ago by Ryan J Ollos

Replying to Andreas:

Well, the DynamicFieldsPlugin (and TracAccountManager) is enabled too. When I then deactivate SimpleMultiProject, it works as it should.

Please try deactivating TracDynamicFields and activating SimpleMultiProject, and confirm the component, milestone, version are correctly populated when switching projects.

comment:23 Changed 5 years ago by Andreas

I can confirm that after deactivating TracDynamicFields the component, milestone and version get correctly populated after switching the project.

For me it seems this only happens when I set the project to "the first entry" like this:

[ticket-custom]
project.set_to_!_when_type = Defect

comment:24 Changed 5 years ago by Ryan J Ollos

To reproduce, the following is needed:

[ticket]
default_type = Defect

comment:25 Changed 5 years ago by Ryan J Ollos

In 17533:

SimpleMultiProject 0.6.0dev: Set milestones from default project

The default project can be set using the project.value attribute
in the [ticket-custom] section.

Refs #13609.

comment:26 Changed 5 years ago by Andreas

Resolution: fixed
Status: acceptedclosed

I's working now, thanks a lot Ryan!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.