Modify

Opened 3 years ago

Closed 2 years ago

#13617 closed enhancement (fixed)

Replace string comparisons with JavaScript booleans

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

Description

In r14718, we switched to using add_script_data, which will convert a Python boolean to a JavaScript boolean. We can simplify the code by replacing string comparisons like spec.overwrite.toLowerCase() == 'false'.

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by Ryan J Ollos

Status: newaccepted

comment:2 Changed 3 years ago by Ryan J Ollos

Type: defectenhancement

comment:3 Changed 3 years ago by Ryan J Ollos

After the 2.3.0 release, I'm thinking to make a Trac 1.0 branch (0.11 and 0.12 branches already exist) and bump the requirement for trunk to Trac 1.2. This issue would probably be addressed after that change.

comment:4 Changed 2 years ago by Ryan J Ollos

In 17720:

TracDynamicFields 2.5.0dev: Use JavaScript booleans

Replaces comparison with string == {'true','false'}

  • Fix SetRule not working for checkboxes when overwrite was false.
  • Fix display of "Show hidden fields".

Refs #13617.

comment:5 Changed 2 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

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.