Index: openacs-4/packages/bug-tracker/www/admin/versions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/versions.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/www/admin/versions.tcl 27 Jun 2015 18:01:15 -0000 1.7 +++ openacs-4/packages/bug-tracker/www/admin/versions.tcl 14 Jun 2018 14:31:46 -0000 1.8 @@ -17,8 +17,26 @@ set return_url "versions" -db_multirow -extend { maintainer_url edit_url delete_url release_url } current_version current_version { -} { +set yes [_ acs-kernel.common_Yes] +set no [_ acs-kernel.common_No] + +db_multirow -extend { + maintainer_url + edit_url + delete_url + release_url + assignable_p_pretty + maintainer_first_names + maintainer_last_name + maintainer_email +} current_version current_version {} { + set m [acs_user::get -user_id $maintainer] + set maintainer_first_names [dict get $m first_names] + set maintainer_last_name [dict get $m last_name] + set maintainer_email [dict get $m email] + + set assignable_p_pretty [expr {$assignable_p ? $yes : $no}] + set edit_url [export_vars -base version-ae { version_id return_url }] if { $num_bugs == 0 } { set delete_url [export_vars -base version-delete { version_id }] @@ -29,8 +47,23 @@ set maintainer_url [acs_community_member_url -user_id $maintainer] } -db_multirow -extend { maintainer_url edit_url delete_url set_active_url } future_version future_versions { -} { +db_multirow -extend { + maintainer_url + edit_url + delete_url + set_active_url + assignable_p_pretty + maintainer_first_names + maintainer_last_name + maintainer_email +} future_version future_versions {} { + set m [acs_user::get -user_id $maintainer] + set maintainer_first_names [dict get $m first_names] + set maintainer_last_name [dict get $m last_name] + set maintainer_email [dict get $m email] + + set assignable_p_pretty [expr {$assignable_p ? $yes : $no}] + set edit_url [export_vars -base version-ae { version_id return_url }] if { $num_bugs == 0 } { set delete_url [export_vars -base version-delete { version_id }] @@ -41,8 +74,22 @@ set set_active_url [export_vars -base version-set-active { version_id return_url }] } -db_multirow -extend { maintainer_url edit_url delete_url } past_version past_versions { -} { +db_multirow -extend { + maintainer_url + edit_url + delete_url + assignable_p_pretty + maintainer_first_names + maintainer_last_name + maintainer_email +} past_version past_versions {} { + set m [acs_user::get -user_id $maintainer] + set maintainer_first_names [dict get $m first_names] + set maintainer_last_name [dict get $m last_name] + set maintainer_email [dict get $m email] + + set assignable_p_pretty [expr {$assignable_p ? $yes : $no}] + set edit_url [export_vars -base version-ae { version_id return_url }] if { $num_bugs == 0 } { set delete_url [export_vars -base version-delete { version_id }] @@ -52,7 +99,3 @@ set maintainer_url [acs_community_member_url -user_id $maintainer] } -ad_return_template - - - Index: openacs-4/packages/bug-tracker/www/admin/versions.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/versions.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/versions.xql 14 Jun 2018 13:21:19 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/versions.xql 14 Jun 2018 14:31:46 -0000 1.3 @@ -10,20 +10,15 @@ v.actual_freeze_date, v.anticipated_release_date, v.maintainer, - u.first_names as maintainer_first_names, - u.last_name as maintainer_last_name, - u.email as maintainer_email, v.supported_platforms, v.active_version_p, v.assignable_p, - case when v.assignable_p = 't' then 'Yes' else 'No' end as assignable_p_pretty, (select count(*) from bt_bugs b where b.found_in_version = v.version_id or b.fix_for_version = v.version_id or b.fixed_in_version = v.version_id) as num_bugs - from bt_versions v left outer join - cc_users u on (u.user_id = v.maintainer) + from bt_versions v where v.project_id = :package_id and v.active_version_p = 't' and v.actual_release_date is null @@ -40,20 +35,15 @@ v.actual_freeze_date, v.anticipated_release_date, v.maintainer, - u.first_names as maintainer_first_names, - u.last_name as maintainer_last_name, - u.email as maintainer_email, v.supported_platforms, v.active_version_p, v.assignable_p, - case when v.assignable_p = 't' then 'Yes' else 'No' end as assignable_p_pretty, (select count(*) from bt_bugs b where b.found_in_version = v.version_id or b.fix_for_version = v.version_id or b.fixed_in_version = v.version_id) as num_bugs - from bt_versions v left outer join - cc_users u on (u.user_id = v.maintainer) + from bt_versions v where v.project_id = :package_id and v.actual_release_date is null and v.active_version_p = 'f' @@ -73,20 +63,15 @@ v.anticipated_release_date, v.actual_release_date, v.maintainer, - u.first_names as maintainer_first_names, - u.last_name as maintainer_last_name, - u.email as maintainer_email, v.supported_platforms, v.active_version_p, v.assignable_p, - case when v.assignable_p = 't' then 'Yes' else 'No' end as assignable_p_pretty, (select count(*) from bt_bugs b where b.found_in_version = v.version_id or b.fix_for_version = v.version_id or b.fixed_in_version = v.version_id) as num_bugs - from bt_versions v left outer join - cc_users u on (u.user_id = v.maintainer) + from bt_versions v where v.project_id = :package_id and v.actual_release_date is not null order by v.actual_release_date, version_name