Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 305325 Details for
Bug 444997
for every update the catalog shows postdate group removed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Delete the error mechanism when it can't figure out the group, becuase the group exists by default in bug db and can always be figured out .
postdate.patch (text/plain), 5.29 KB, created by
XINSUN
on 2008-05-14 03:42:28 UTC
(
hide
)
Description:
Delete the error mechanism when it can't figure out the group, becuase the group exists by default in bug db and can always be figured out .
Filename:
MIME Type:
Creator:
XINSUN
Created:
2008-05-14 03:42:28 UTC
Size:
5.29 KB
patch
obsolete
>Index: hwcert.pl >=================================================================== >RCS file: /cvs/qa/hwcert/hwcert.pl,v >retrieving revision 1.49 >diff -u -r1.49 hwcert.pl >--- hwcert.pl 29 Feb 2008 11:54:40 -0000 1.49 >+++ hwcert.pl 14 May 2008 03:37:53 -0000 >@@ -1518,64 +1518,71 @@ > sub SetPostDate { > my ( $bug_id, $new_postdate, $userid ) = @_; > >- SendSQL("SELECT ".Bugzilla::DB::Now('select')); >- my $timestamp = FetchOneColumn(); >+ return if (!$bug_id || !$new_postdate || !$userid); > > #Find the hwcert_postdate group ID >- my $query= "SELECT id FROM groups WHERE name = '".HWCERT_POST_DATE."'"; >- SendSQL($query); >- my $HWCERT_POSTDATE_group_id = FetchOneColumn(); >+ my $HWCERT_POSTDATE_group_id = GroupNameToId(HWCERT_POST_DATE); >+ >+ #Find if this bug is in the hwcert_postdate group >+ my $bug_in_postdate = BugInGroupId($bug_id,$HWCERT_POSTDATE_group_id); > >- #Add hwcert_postdate group IF hwcert_postdate group doesn't exist for this cert >- if ($HWCERT_POSTDATE_group_id) { >- $query= "SELECT bug_id FROM bug_group_map WHERE group_id = $HWCERT_POSTDATE_group_id and bug_id=$bug_id"; >- SendSQL($query); >- my $hwcert_postdate_existed = FetchOneColumn(); >- if (!$hwcert_postdate_existed) { >- $query="INSERT INTO bug_group_map (bug_id, group_id) VALUES ($bug_id,$HWCERT_POSTDATE_group_id)"; >- SendSQL($query); >- LogActivityEntry($bug_id, "bug_group", '', HWCERT_POST_DATE, $userid, $timestamp ); >- } >+ #Get the current timestamp for LogActivityEntry. >+ SendSQL("SELECT ".Bugzilla::DB::Now('select')); >+ my $timestamp = FetchOneColumn(); >+ >+ #Add this bug into the hwcert_postdate group if it is not in the hwcert_postdate group >+ if (!$bug_in_postdate) { >+ my $query="INSERT INTO bug_group_map (bug_id, group_id) VALUES ($bug_id,$HWCERT_POSTDATE_group_id)"; >+ SendSQL($query); >+ LogActivityEntry($bug_id, "bug_group", '', HWCERT_POST_DATE, $userid, $timestamp ); > } >+ >+ #Set the dealine value when hwcert_postdate create at frist time. Or modify the dealine value when wants to delay the date of posting and hwcert_posdate has already exists. > trick_taint($new_postdate); > my $query= "SELECT " .Bugzilla::DB::DateFormat('deadline','%Y-%c-%e') . " FROM bugs WHERE bug_id = $bug_id "; > SendSQL($query); > my $old_postdate = FetchOneColumn(); > > if ($new_postdate ne $old_postdate) { >- #Set/Reset the post-date >- $query = "UPDATE bugs SET deadline = '" . $new_postdate . "' WHERE bug_id = $bug_id"; >- SendSQL($query); >- LogActivityEntry($bug_id, "deadline",$old_postdate, $new_postdate, $userid, $timestamp ); >+ $query = "UPDATE bugs SET deadline = '" . $new_postdate . "' WHERE bug_id = $bug_id"; >+ SendSQL($query); >+ LogActivityEntry($bug_id, "deadline",$old_postdate, $new_postdate, $userid, $timestamp ); > } >+ > } > > #Function: Unset the post-date in the bugs.deadline and Del the hwcert_postdate group from bug_group_map,when canedit unclick the "use_postdate" checkbox > sub UnsetPostDate { > my ( $bug_id, $userid ) = @_; > >- SendSQL("SELECT ".Bugzilla::DB::Now('select')); >- my $timestamp = FetchOneColumn(); >+ return if (!$bug_id || !$userid); > > #Find the hwcert_postdate group ID >- my $query= "SELECT id FROM groups WHERE name = '".HWCERT_POST_DATE."'"; >- SendSQL($query); >- my $HWCERT_POSTDATE_group_id = FetchOneColumn(); >+ my $HWCERT_POSTDATE_group_id = GroupNameToId(HWCERT_POST_DATE); >+ >+ #Find if this bug is in the hwcert_postdate group >+ my $bug_in_postdate = BugInGroupId($bug_id,$HWCERT_POSTDATE_group_id); > >- #Delete hwcert_postdate group IF hwcert_postdate group exists for this cert >- if ($HWCERT_POSTDATE_group_id) { >- $query= "DELETE FROM bug_group_map WHERE bug_id = $bug_id AND group_id = $HWCERT_POSTDATE_group_id"; >- SendSQL($query); >- LogActivityEntry($bug_id, "bug_group", HWCERT_POST_DATE, '', $userid, $timestamp ); >- >- #Unset post-date >- $query= "SELECT " .Bugzilla::DB::DateFormat('deadline','%Y-%c-%e') . " FROM bugs WHERE bug_id = $bug_id "; >- SendSQL($query); >- my $old_postdate = FetchOneColumn(); >- >- $query = "UPDATE bugs SET deadline = NULL WHERE bug_id = $bug_id"; >- SendSQL($query); >- LogActivityEntry($bug_id, "deadline",$old_postdate, '', $userid, $timestamp ); >+ if ($bug_in_postdate) { >+ #Get the current timestamp for LogActivityEntry. >+ SendSQL("SELECT ".Bugzilla::DB::Now('select')); >+ my $timestamp = FetchOneColumn(); >+ >+ #Delete the bug from hwcert_postdate group >+ my $query= "DELETE FROM bug_group_map WHERE bug_id = $bug_id AND group_id = $HWCERT_POSTDATE_group_id"; >+ SendSQL($query); >+ LogActivityEntry($bug_id, "bug_group", HWCERT_POST_DATE, '', $userid, $timestamp ); >+ >+ #Unset post-date >+ $query= "SELECT " .Bugzilla::DB::DateFormat('deadline','%Y-%c-%e') . " FROM bugs WHERE bug_id = $bug_id "; >+ SendSQL($query); >+ my $old_postdate = FetchOneColumn(); >+ >+ if ($old_postdate) { >+ $query = "UPDATE bugs SET deadline = NULL WHERE bug_id = $bug_id"; >+ SendSQL($query); >+ LogActivityEntry($bug_id, "deadline",$old_postdate, '', $userid, $timestamp ); >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444997
:
305191
| 305325