Edgewall Software
Modify

Opened 2 years ago

Last modified 2 months ago

#12848 new enhancement

Add an ifnull function to database connection classes

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-major-releases
Component: database backend Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description

Copied from 12841#comment:2:


One proposed change in [9f25cdfb3/rjollos.git].

When the group heading is NULL, it would be nice if Milestone (empty) was shown rather than just (empty). We could add an isnull function for each connection class and modify the reports. For example, on SQLite for report {3} we'd have:

-   'Milestone '||milestone AS __group__,
+   'Milestone '||ifnull(milestone,'(empty)') AS __group__,

I don't think it would be worth fixing up existing reports through a database upgrade step, but we could modify the reports in the database to affect new installations and add a note to TracUpgrade about how to manually modify reports.

Attachments (0)

Change History (4)

comment:1 by Jun Omae, 2 years ago

COALESCE() is portable.

comment:2 by Ryan J Ollos, 2 years ago

Replying to Jun Omae:

Replying to Ryan J Ollos:

For example, on SQLite for report {3} we'd have:

-   'Milestone '||milestone AS __group__,
+   'Milestone '||ifnull(milestone,'(empty)') AS __group__,

If '(empty)' is embedded in the report, (empty) cannot be translated.

Will need to address this somehow in implementation.

comment:3 by Ryan J Ollos, 3 months ago

Milestone: next-dev-1.3.xnext-dev-1.5.x

Milestone renamed

comment:4 by Ryan J Ollos, 2 months ago

Milestone: next-dev-1.5.xnext-major-releases

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.