Error in query when clicking in the 'Backlog' tab (/projects/[PROJECT_NAME]/agile_versions) [PRO PLUGIN VERSION]

1

ESTEBAN LOMBARDIA
Added over 3 years ago

When I activate the 'Agile Backlog' module in a project and try to go to the 'Backlog' tab, redmine throws this query error:

Mysql2::Error: Unknown column 'projects.status' in 'on clause': SELECT `queries`.`id` AS t0_r0, `queries`.`project_id` AS t0_r1, `queries`.`name` AS t0_r2, `queries`.`filters` AS t0_r3, `queries`.`user_id` AS t0_r4, `queries`.`column_names` AS t0_r5, `queries`.`sort_criteria` AS t0_r6, `queries`.`group_by` AS t0_r7, `queries`.`type` AS t0_r8, `queries`.`visibility` AS t0_r9, `queries`.`options` AS t0_r10, `users`.`id` AS t1_r0, `users`.`login` AS t1_r1, `users`.`hashed_password` AS t1_r2, `users`.`firstname` AS t1_r3, `users`.`lastname` AS t1_r4, `users`.`admin` AS t1_r5, `users`.`status` AS t1_r6, `users`.`last_login_on` AS t1_r7, `users`.`language` AS t1_r8, `users`.`auth_source_id` AS t1_r9, `users`.`created_on` AS t1_r10, `users`.`updated_on` AS t1_r11, `users`.`type` AS t1_r12, `users`.`identity_url` AS t1_r13, `users`.`mail_notification` AS t1_r14, `users`.`salt` AS t1_r15, `users`.`must_change_passwd` AS t1_r16, `users`.`passwd_changed_on` AS t1_r17, `members`.`id` AS t2_r0, `members`.`user_id` AS t2_r1, `members`.`project_id` AS t2_r2, `members`.`created_on` AS t2_r3, `members`.`mail_notification` AS t2_r4 FROM `queries` LEFT OUTER JOIN `users` ON `users`.`id` = `queries`.`user_id` AND `users`.`type` IN ('User', 'AnonymousUser') LEFT OUTER JOIN `members` ON `members`.`user_id` = `users`.`id` AND (`projects`.`status` != 9) WHERE `queries`.`type` IN ('AgileVersionsQuery') AND (1=1) AND `queries`.`project_id` = 38 AND (queries.visibility = 1)

If I go to the same page but adding a parameter as e.g. 'set_filter' (/projects/[PROJECT_NAME]/agile_versions?set_filter=1) it works OK.

I have attached the error in 'agile_board_error.html'

I think the query is malformed. I do not know the exact structure of the database but I think one solution would be to JOIN the projects table and move the (`projects`.`status` != 9) to the WHERE statement:

SELECT `queries`.`id` AS t0_r0, `queries`.`project_id` AS t0_r1, `queries`.`name` AS t0_r2, `queries`.`filters` AS t0_r3, `queries`.`user_id` AS t0_r4, `queries`.`column_names` AS t0_r5, `queries`.`sort_criteria` AS t0_r6, `queries`.`group_by` AS t0_r7, `queries`.`type` AS t0_r8, `queries`.`visibility` AS t0_r9, `queries`.`options` AS t0_r10, `users`.`id` AS t1_r0, `users`.`login` AS t1_r1, `users`.`hashed_password` AS t1_r2, `users`.`firstname` AS t1_r3, `users`.`lastname` AS t1_r4, `users`.`admin` AS t1_r5, `users`.`status` AS t1_r6, `users`.`last_login_on` AS t1_r7, `users`.`language` AS t1_r8, `users`.`auth_source_id` AS t1_r9, `users`.`created_on` AS t1_r10, `users`.`updated_on` AS t1_r11, `users`.`type` AS t1_r12, `users`.`identity_url` AS t1_r13, `users`.`mail_notification` AS t1_r14, `users`.`salt` AS t1_r15, `users`.`must_change_passwd` AS t1_r16, `users`.`passwd_changed_on` AS t1_r17, `members`.`id` AS t2_r0, `members`.`user_id` AS t2_r1, `members`.`project_id` AS t2_r2, `members`.`created_on` AS t2_r3, `members`.`mail_notification` AS t2_r4 FROM `queries` LEFT OUTER JOIN `users` ON `users`.`id` = `queries`.`user_id` AND `users`.`type` IN ('User', 'AnonymousUser') LEFT OUTER JOIN `members` ON `members`.`user_id` = `users`.`id` LEFT OUTER JOIN `projects` ON `queries`.`project_id` = `projects`.`id` WHERE `queries`.`type` IN ('AgileVersionsQuery') AND (1=1) AND `queries`.`project_id` = 38 AND (queries.visibility = 1) AND (`projects`.`status` != 9)

Dimitar Chervenakov over 3 years

Hi, Esteban. Further investigation is needed on this problem. Please provide your full system information (administration - information) to and mention what is the case about. Thank you.

Answers (1)

-1

Dimitar Chervenakov
Added over 3 years ago

Hello, Esteban. Further investigation is needed on this problem. Please provide your full system information (administration - information) to and mention what is the case about. Thank you.

    (1-1/1)