Page MenuHomePhorge

Strip surrounding whitespace from project and task titles
AcceptedPublic

Authored by aklapper on Tue, Oct 29, 10:34.

Details

Reviewers
valerio.bozzolan
Group Reviewers
O1: Blessed Committers
Summary

When creating or renaming a project or a task, copy and paste can lead to unwanted whitespace.
Thus strip any whitespace from the beginning and end of the title string by using trim() when running validateTransactions().

Test Plan

Create and rename projects and tasks with whitespace at the beginning and the end of their names. Confirm that the whitespace gets removed. Get correctly sorted database query search results, don't get notification mail saying Foo added a parent task: Txxxx: Title . anymore which annoys pedants like me.

Diff Detail

Repository
rP Phorge
Branch
stripTitleWhitespace (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1615
Build 1615: arc lint + arc unit

Event Timeline

Thanks. Seems good to me since trim($new) does not receive null so cannot create PHP 8.1 problems, since we already execute strlen($new) and mb_strlen($new) and that was not reporting errors in your updated install

This revision is now accepted and ready to land.Tue, Oct 29, 12:11