Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454044 - Where is the "Attach as result" check box in "Create Another Attachment to Certification #xxxxxx"
Summary: Where is the "Attach as result" check box in "Create Another Attachment to Ce...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Hardware Catalog
Version: 5
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: XINSUN
QA Contact: Yu Shao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-04 03:33 UTC by QinXie
Modified: 2008-10-28 06:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-28 06:16:18 UTC


Attachments (Terms of Use)
Patch Fix: (deleted)
2008-08-11 10:07 UTC, XINSUN
no flags Details | Diff

Description QinXie 2008-07-04 03:33:52 UTC
Description of problem:

I can't find the check box "Attach as result" in "Create Another Attachment to
Certification #xxxxxx" when I try to upload the second one. It should be there.

Comment 1 XINSUN 2008-08-11 10:07:26 UTC
Created attachment 313935 [details]
Patch Fix:

template/en/default/attachment/create.html.tmpl :
1. Add permission control for this template,same as the  "/bug/upload_packages.html.tmpl"
   (@@ -19,6 +19,7 @@ 
      [% IF canedit && !isduplicate && bug.bug_status!='CLOSED' %]
   )
    

2. Add the two checkboxes "attachasresult" && "md5sumoverride", same as the "/bug/upload_packages.html.tmpl".

3. Add rhr retire warning clearbox and related javascript, same as the "/bug/upload_packages.html.tmpl".

4.Remove the javascript setContentTypeDisabledState(), because it is not useful in  our catalog, it was used in bz, for judging the attachment's content type,if the "is patch" checkbox checked.then disabled the content type: "auto-detect/select from list/enter manually".

5.@@ -61,7 +61,7 @@ change the attachment action from "edit" to "view". because "edit" was used by bz,it does not work in catalog, for example: https://hardware.redhat.com/attachment.cgi?bugid=457433&action=enter.
If we click the link "313119: Add -ldl to linker options" , it will throw an error "Unknown action edit!". this is cause by catalog didn't use this feature and  missing the related template. so change the action from "edit" to "view".


pls reveiw and take a look at http://bugdev.devel.redhat.com/hwcert-xisun2/attachment.cgi?bugid=246680&action=enter


Thanks a lot :)

Best Regards!
Nicho

Comment 2 Rob Landry 2008-08-11 14:04:12 UTC
perhaps it would be cleaner/less duplicate code to simply process the upload_packages.html.tmpl?

Comment 4 Rob Landry 2008-08-12 15:56:51 UTC
question, why is the attachment.cgi change needed?  I wouldn't think we'd suddenly need all of the bug data?  Obviously there's some form of recursion going on I presume from show.cgi we had some data that was needed which gets lost on the 2nd call to attachment.cgi?

Comment 5 XINSUN 2008-08-13 00:34:14 UTC
[% canedit = bug.canedit || UserInGroup('hwcert_edit') ? 1 : 0 %]
[% isduplicate = bug.bug_status == 'CLOSED' && bug.resolution == 'DUPLICATE' %]

Above need the bug data for permission control. 
The bug data was lost when call attachment.cgi.
If we don't have permission control, then vendor can upload the package via the link: https://hardware.redhat.com/attachment.cgi?bugid=457433&action=enter.

Best Regards!
Nicho

Comment 6 XINSUN 2008-08-13 00:54:57 UTC
(In reply to comment #5)
> [% canedit = bug.canedit || UserInGroup('hwcert_edit') ? 1 : 0 %]
> [% isduplicate = bug.bug_status == 'CLOSED' && bug.resolution == 'DUPLICATE' %]
> 
> Above need the bug data for permission control. 
> The bug data was lost when call attachment.cgi.
> If we don't have permission control, then vendor can upload the package via the
> link: https://hardware.redhat.com/attachment.cgi?bugid=457433&action=enter.
> 
> Best Regards!
> Nicho

Adding the attachment.cgi's change is only for the blew case:
Without that changes, if a cert was closed or a cert is duplicate cert 
(This case is not allow vendor upload packages.). 
  When a vendor directly type the link:"https://hardware.redhat.com/attachment.cgi?bugid=457433&action=enter".

  Then the vendor can upload the package in that page. because:
[% IF canedit && !isduplicate && bug.bug_status!='CLOSED' %]
The bug data will lost because vendor directly call attachment.cgi.
isduplicate will be '' and bug.bug_staus will be ''.
Then the "upload_packages.html.tmpl" will be shown.

Best Regards!
Nicho

Comment 7 XINSUN 2008-08-13 01:04:55 UTC
(In reply to comment #4)
> question, why is the attachment.cgi change needed?  I wouldn't think we'd
> suddenly need all of the bug data?  Obviously there's some form of recursion
> going on I presume from show.cgi we had some data that was needed which gets
> lost on the 2nd call to attachment.cgi?

yep. from show.cgi we had some data that was needed which gets
lost on the 2nd call to attachment.cgi.

Comment 8 Rob Landry 2008-08-13 02:23:58 UTC
ok, looks good to me, please check it in after testing has been successful.

Comment 9 XINSUN 2008-08-18 07:40:09 UTC
Tested well. checked into cvs.


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