Comment 9 for bug 109533

Revision history for this message
Markus Korn (thekorn) wrote :

Alexander,
this falling back to the text attribute is a real big problem caused by the design of the whole infofile classes and functions: for example we are using the condition_matches function to look in either a Bug-object or a BugAttachment-object. The problem is that BugAttachement for example does not have a "title" attribute. So when you have something like <op field="title">MASTER</op> and you tell bughelper to quit whenever field is not in attributes then it will never work.

So the easiest solution is to fallback to .text as it is an attribute of Bug and BugAttachment.

So we need another solution, my suggestion: an other attribute in op called "in".

Examples:
<op field="title" in="Bug">MASTER</op> - That would search the title of a bugreport
<op field="title" in="BugAttachment">MASTER</op> - That would always fail as there is no BugAttachment.title, but that is the mistake of the user
<op field="title">MASTER</op> - That would search in Bug and BugAttachement but fail for Attachment, again mistake by the user

I'm happy to hear any other and better solution!

Markus