Use index_of instead of lsearch in templates

RESOLVED WONTFIX

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED WONTFIX
6 years ago
6 years ago

People

(Reporter: selsky, Assigned: selsky)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 627752 [details] [diff] [review]
v1

Bug 560009 comment 3 suggested using index_of instead of lsearch in templates for clarity.
Attachment #627752 - Flags: review?(LpSolit)

Comment 1

6 years ago
I'm not really happy to potentially break existing extensions which may use it because we simply renamed a TT function. If we changed its behavior at the same time, then why not, but here it's not the case. I agree that index_of() is much better than lsearch(), but lsearch() exists since Bugzilla 1.0! On the other hand, I don't know if this function is used a lot or not.
Severity: normal → enhancement
(Assignee)

Comment 2

6 years ago
Should I leave lsearch as an alias for index_of for compatibility?

Comment 3

6 years ago
There is a clear consensus on IRC to not break extensions, so we won't rename this function.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX

Updated

6 years ago
Attachment #627752 - Flags: review?(LpSolit) → review-
You need to log in before you can comment on or make changes to this bug.