Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13941 closed defect (fixed)

ticket preview not triggered

Reported by: clemens Owned by: clemens
Priority: normal Component: TracKeywordsPlugin
Severity: normal Keywords: patch
Cc: Trac Release: 1.4

Description

The ticket preview rendering is not triggered when using the TracKeywordsPlugin (source:trackeywordsplugin/trunk@17396, version "1.0dev").

Concerning the ticket preview (at bottom of a ticket page) one should expect that "keyword" changes made by TracKeywordsPlugin are handled just like manual input.

The TracKeywordsPlugin offers a panel to modify the ticket "keywords" field by just clicking some predefined keywords without actually typing anything into the "keywords" field. Here seems to be the problem. We need to call a change event to trigger the preview.

PATCH: attachment:"trac_keywords_2021-01-17.js.diff"

Attachments (1)

trac_keywords_2021-01-17.js.diff (511 bytes) - added by clemens 4 years ago.
patch which will call the change event

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by clemens

patch which will call the change event

comment:1 Changed 4 years ago by clemens

Basically my patch just triggers the change event each time the plugin runs.

 // trigger change event on the edit field in order to evoke ticket preview
 el.dispatchEvent(new Event('change'));

I tested and it works.

However, I have to admit one issue which I could not solve: At the very first keyword change after loading the ticket it will not trigger the preview. (I do not mean the first in the list, but the first ticket which the user would click. No matter which one.) I do not know why. This is somewhat disappointing.

comment:2 Changed 4 years ago by Ryan J Ollos

Owner: set to clemens
Status: newassigned

comment:3 Changed 4 years ago by clemens

Resolution: fixed
Status: assignedclosed

In 17979:

trigger Javascript change event on the edit field in order to evoke ticket preview

closes #13941

comment:4 in reply to:  1 Changed 4 years ago by Ryan J Ollos

Replying to clemens:

However, I have to admit one issue which I could not solve: At the very first keyword change after loading the ticket it will not trigger the preview. (I do not mean the first in the list, but the first ticket which the user would click. No matter which one.) I do not know why. This is somewhat disappointing.

Might be related to trac:#13298.

Modify Ticket

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