However, some endpoints allow name duplications (e.g. projects and versions), so it might become difficult to decide witch ID should be chosen on a name collision.
Instead of editing this methods (to use the listNames() methods internally) and made prediction about name collisions I propose to deprecated them and let the user handle this situation.
In #338 we have deprecated all
listing()
methods. These methods are the base for thegetIdByName()
methods.Getting the ID by a name could easily made by using the new
listNames()
methods andarray_search()
.However, some endpoints allow name duplications (e.g.
projects
andversions
), so it might become difficult to decide witch ID should be chosen on a name collision.Instead of editing this methods (to use the
listNames()
methods internally) and made prediction about name collisions I propose to deprecated them and let the user handle this situation.Affected methods
CustomField::getIdByName()
IssueCategory::getIdByName()
IssueStatus::getIdByName()
Project::getIdByName()
TimeEntryActivity::getIdByName()
Tracker::getIdByName()
User::getIdByUsername()
Version::getIdByName()