Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion via issue ID doesn't work #189

Closed
ghost opened this issue Sep 23, 2014 · 3 comments
Closed

Autocompletion via issue ID doesn't work #189

ghost opened this issue Sep 23, 2014 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Sep 23, 2014

At least not with postgresql:

ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR:  function lower(integer) does not exist
LINE 1: ..._modules em WHERE em.name='issue_tracking')) AND (LOWER(issu...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
: SELECT "issues"."id" AS t0_r0, "issues"."tracker_id" AS t0_r1, "issues"."project_id" AS t0_r2, "issues"."subject" AS t0_r3, "issues"."description" AS t0_r4, "issues"."due_date" AS t0_r5, "issues"."category_id" AS t0_r6, "issues"."status_id" AS t0_r7, "issues"."assigned_to_id" AS t0_r8, "issues"."priority_id" AS t0_r9, "issues"."fixed_version_id" AS t0_r10, "issues"."author_id" AS t0_r11, "issues"."lock_version" AS t0_r12, "issues"."created_on" AS t0_r13, "issues"."updated_on" AS t0_r14, "issues"."start_date" AS t0_r15, "issues"."done_ratio" AS t0_r16, "issues"."estimated_hours" AS t0_r17, "issues"."parent_id" AS t0_r18, "issues"."root_id" AS t0_r19, "issues"."lft" AS t0_r20, "issues"."rgt" AS t0_r21, "issues"."is_private" AS t0_r22, "issues"."closed_on" AS t0_r23, "projects"."id" AS t1_r0, "projects"."name" AS t1_r1, "projects"."description" AS t1_r2, "projects"."homepage" AS t1_r3, "projects"."is_public" AS t1_r4, "projects"."parent_id" AS t1_r5, "projects"."created_on" AS t1_r6, "projects"."updated_on" AS t1_r7, "projects"."identifier" AS t1_r8, "projects"."status" AS t1_r9, "projects"."lft" AS t1_r10, "projects"."rgt" AS t1_r11, "projects"."inherit_members" AS t1_r12 FROM "issues" LEFT OUTER JOIN "projects" ON "projects"."id" = "issues"."project_id" WHERE (projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (LOWER(issues.id) LIKE '%2%')):
@ghost
Copy link
Author

ghost commented Sep 23, 2014

Fixed it here: https://github.com/madeup/redmine_time_tracker/commit/1e25883640542c9e9a1c6fc0b736398319dbf2af

Also removed the lowercasing. I'm not entirely sure what changing case in a number was supposed to do in the first place.

@ghost
Copy link
Author

ghost commented Sep 23, 2014

Or rather fixed here: https://github.com/madeup/redmine_time_tracker/commit/121ecf72c688dbf66ff81d737803d2928b6a295e

(Looks like mysql doesn't know what a cast to varchar is, while for postgresql a char is a single-character type)

@arBmind arBmind added the bug label Oct 28, 2014
@jume-dev
Copy link

I fixed it with removing the lower for the id, which was kinda strange anyway ;)
Anyway, thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants