#6261: Bug in adding attachments with patch flag set ---------------------------+------------------------------------------------ Reporter: andreasf | Owner: nielx Type: bug | Status: new Priority: normal | Milestone: Component: Website/Trac | Version: Resolution: | Keywords: attachmentflags Blocked By: | Has a Patch: 0 Platform: All | Blocking: ---------------------------+------------------------------------------------ Comment (by nielx): Actually, looking back at #6061, I don't think it is a bug, but intended behavior. You should imagine that the attachmentflags module overrides two systems, the attachment system and the ticket system. In Trac these two are separate so that the same attachment subsystem can be used for the wiki pages. The plugin overrides the attachment listing/viewing/adding functionality of the attachment subsystem, and the custom fields of the ticket subsystem. If you add an attachment to a ticket (wiki/other attachments are ignored) then the flags field are shown. If any field is checked, the system will determine whether it is a patch or not (obsolete flag overrides the patch flag). It also looks at other attachments for the ticket, so if you have two attachments with a patch flag set, and you obsolete one, then the ticket still has a patch. Then it determines whether it should set/unset the patch field in the ticket system. What happened in ticket #6061 is that you added an attachment with the patch flag set. The attachmentflags module then decides to tell the ticket module to set the patch flag (which is the numbered comment). The other attachments do not change the patch flag, so no numbered comments for those. Web apps are by nature not state aware, so adding the attachments in a row and then adding the 'Has a patch' comment afterwards needs some unclean hacking in the code. -- Ticket URL: <http://dev.haiku-os.org/ticket/6261#comment:3> Haiku <http://dev.haiku-os.org> Haiku - the operating system.