The $::unconfirmedstate variable should either be in Bugzilla::Config or Bugzilla::Constants. I think it makes the most sense inside of Bugzilla::Constants. (Right now it's in globals.pl, so it must go somewhere else.)
No, it should go away. We don't have $::duplicatestate.... If it does go anywhere, it and all the code that uses it should go into Bug.pm. I was at one point trying to avoid just moving code out of globals.pl - it should instead be fixed/modernised/objectised/etc before moving into modules.
I think that the re-architecting is more urgent than the code modernization. That is, the code modernization may take years, but we can do the re-arch right now.
Also, I think it's an OK idea to have UNCONFIRMED_STATE -- I think eventually it will help with custom statuses.
Created attachment 170120 [details] [diff] [review] Patch against the tip This patch just does a straight move of the var from one place to the other, and makes all the necessary code changes. It's pretty straightforward. We can consider bbaetz's comment above, too.
Attachment #170120 - Flags: review?(justdave)
Attachment #170120 - Flags: review?(justdave) → review?
Actually, thinking about it more, I agree with bbaetz. There are many places that we use a raw "UNCONFIRMED," now. We should just switch to always using that.
Summary: Move $::unconfirmedstate into Bugzilla::Constants → Eliminate use of $::unconfirmedstate
The change, will, of course, need to be relnoted, for anybody who's customized the name of the "UNCONFIRMED" state. (Which is probably not too many people, since the change would have also required changing anywhere that we already use "UNCONFIRMED" directly.)
Created attachment 172777 [details] [diff] [review] Eliminate $::unconfirmedstate OK, this patch gets *rid* of $::unconfirmedstate. I'm not going to obsolete the other patch. If for some reason we decide that we want to keep $::unconfirmedstate, and just move it instead, we can use the patch above instead of this one.
Attachment #172777 - Flags: review?
Comment on attachment 170120 [details] [diff] [review] Patch against the tip Yeap, mkanat and bbaetz are right, UNCONFIRMED_STATE should be hard-coded to "UNCONFIRMED" until we provide generic status support.
Attachment #170120 - Flags: review? → review-
Comment on attachment 170120 [details] [diff] [review] Patch against the tip Obsoleting patch as per comment 8.
Attachment #170120 - Attachment is obsolete: true
Comment on attachment 172777 [details] [diff] [review] Eliminate $::unconfirmedstate This doesn't apply any more... I'm ready to carry $::unconfirmedstate on a new patch to its grave, though.
Attachment #172777 - Flags: review? → review-
Created attachment 173281 [details] [diff] [review] Version 2 (Applies to current tip) OK, here's a patch that applies to the current tip.
Attachment #173281 - Flags: review?(wurblzap) → review+
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.20
Checking in CGI.pl; /cvsroot/mozilla/webtools/bugzilla/CGI.pl,v <-- CGI.pl new revision: 1.226; previous revision: 1.225 done Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.277; previous revision: 1.276 done Checking in editproducts.cgi; /cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v <-- editproducts.cgi new revision: 1.66; previous revision: 1.65 done Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.102; previous revision: 1.101 done Checking in globals.pl; /cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl new revision: 1.297; previous revision: 1.296 done Checking in post_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi new revision: 1.99; previous revision: 1.98 done Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.232; previous revision: 1.231 done Checking in sanitycheck.cgi; /cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v <-- sanitycheck.cgi new revision: 1.76; previous revision: 1.75 done Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.53; previous revision: 1.52 done Checking in Bugzilla/BugMail.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v <-- BugMail.pm new revision: 1.29; previous revision: 1.28 done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Added to the release notes in bug 286274.
You need to log in before you can comment on or make changes to this bug.