Bug 520531 - Checksetup.pl fails due to problem with extensions/redhat_fields/code/filter_custom_fields.pl
Summary: Checksetup.pl fails due to problem with extensions/redhat_fields/code/filter_...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.4
Hardware: All
OS: Linux
low
medium vote
Target Milestone: ---
Assignee: Noura El hawary
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 520523
TreeView+ depends on / blocked
 
Reported: 2009-08-31 22:59 UTC by David Lawrence
Modified: 2013-06-24 04:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-14 16:13:45 UTC


Attachments (Terms of Use)

Description David Lawrence 2009-08-31 22:59:31 UTC
Description of problem:
Code in modules called by checksetup.pl calls Bugzilla::Hook which does does a do() on each extension code script. The extensions/redhat_fields/code/filter_custom_fields.pl in particular crashes checksetup.pl as it tries to load its values before checksetup.pl has had a chance to add the new visibility_value_id field to bug_cf_partner table.

Error:
DBD::mysql::db selectall_arrayref failed: Unknown column 'visibility_value_id' in 'field list' [for Statement "SELECT id,value,sortkey,isactive,visibility_value_id FROM cf_partner ORDER BY sortkey, value"] at Bugzilla/Object.pm line 229
Bugzilla::Object::_do_list_select('Bugzilla::Field::Choice::cf_partner') called at Bugzilla/Object.pm line 410
	Bugzilla::Object::get_all('Bugzilla::Field::Choice::cf_partner') called at Bugzilla/Field.pm line 510
	Bugzilla::Field::legal_values('Bugzilla::Field=HASH(0x10f3f490)') called at Bugzilla/User.pm line 1054
	Bugzilla::User::can_set_targetrelease('Bugzilla::User=HASH(0xd0f2a30)') called at ./extensions/redhat_fields/code/filter_custom_fields.pl line 40
	require ./extensions/redhat_fields/code/filter_custom_fields.pl called at Bugzilla/Hook.pm line 51
	Bugzilla::Hook::process('filter_custom_fields', 'HASH(0xdd79180)') called at Bugzilla.pm line 542

If you move the extensions/redhat_fields/code/filter_custom_fields.pl out of the way and re-run checksetup.pl the process is allowed to continue without error.

Comment 1 Noura El hawary 2009-10-13 12:44:25 UTC
Hey Dave,

How can I reproduce this error? by running checksetup.pl on bz-web1? I tried running it there but got no errors.

Thanks,
Noura

Comment 2 Tony Fu 2009-10-14 00:15:48 UTC
(In reply to comment #1)
> Hey Dave,
> 
> How can I reproduce this error? by running checksetup.pl on bz-web1? I tried
> running it there but got no errors.
> 
> Thanks,
> Noura  

Noura,

I didn't get this errors either when I ran checksetup.pl on bz-web1.  But I think it may happen if there are some inconsistency between the table definition in bz_schema table and actual tables.  For example, in bz_schema table, the cf_partner has the 'visibility_value_id' column but the actual cf_partner doesn't include that column.

I will ask our system admin to re-import the data to bugs34 on bz-db1 and run checksetup.pl again and see if we can get that error.


Tony

Comment 3 Noura El hawary 2009-10-14 15:56:39 UTC
Hi Tony,

I tried to remove visibility_value_id from the cf_partner table and then reran checksetup.pl but it has given me a different error related to ThrowTemplateError,  please let me know how the data refresh will go.

Thanks,
Noura

Comment 4 Tony Fu 2009-10-19 07:05:39 UTC
After refresh the data on bugs34 on bz-db1-test, still couldn't reproduced the error.

Close this bug now and will reopen it if this error occurs again.

Comment 5 David Lawrence 2009-11-03 22:38:37 UTC
This reoccured on partner-bugzilla.redhat.com when doing 3.2 to 3.4 migration. 

Undefined subroutine &Bugzilla::Util::ThrowTemplateError called at Bugzilla/Util.pm line 628.

Fix: touch extensions/redhat_fields/disabled

Reopening.

Comment 6 Noura El hawary 2009-12-14 11:35:13 UTC
Hi David,

Is this fixed now?

Noura

Comment 7 David Lawrence 2009-12-14 16:13:45 UTC
I would say so. This has not happened the last two times that we converted the live db on partner-bugzilla. I wish I knew why this is not failing anymore but did before for me. We can just keep an eye out for it in the future I guess.

Dave


Note You need to log in before you can comment on or make changes to this bug.