Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367861 - fields marked as incoming on Eclipse.org that had no changes
Summary: fields marked as incoming on Eclipse.org that had no changes
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 3.7   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 368847 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-04 10:47 EST by Steffen Pingel CLA
Modified: 2012-03-03 11:34 EST (History)
2 users (show)

See Also:


Attachments
tooltip (12.78 KB, image/png)
2012-01-04 10:48 EST, Steffen Pingel CLA
no flags Details
task editor (10.74 KB, image/png)
2012-01-04 10:48 EST, Steffen Pingel CLA
no flags Details
mylyn/context/zip (5.00 KB, application/octet-stream)
2012-01-08 15:24 EST, Frank Becker CLA
no flags Details
mylyn/context/zip (8.71 KB, application/octet-stream)
2012-01-12 13:19 EST, Frank Becker CLA
no flags Details
mylyn/context/zip (16.97 KB, application/octet-stream)
2012-01-22 13:03 EST, Frank Becker CLA
no flags Details
mylyn/context/zip (6.44 KB, application/octet-stream)
2012-02-24 14:27 EST, Frank Becker CLA
no flags Details
mylyn/context/zip (64.10 KB, application/octet-stream)
2012-03-03 10:09 EST, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2012-01-04 10:47:59 EST
Since the migration to Bugzilla 4.0 on Eclipse.org I'm seeing incoming notifications in the task editor for the Resolution, Keywords and Status Whiteboard fields even though these don't appear to have changed (see screenshot).
Comment 1 Steffen Pingel CLA 2012-01-04 10:48:29 EST
Created attachment 209015 [details]
tooltip
Comment 2 Steffen Pingel CLA 2012-01-04 10:48:54 EST
Created attachment 209016 [details]
task editor
Comment 3 Frank Becker CLA 2012-01-08 14:25:28 EST
Steffen,

I found the source of this problem.

Starting with version 4.0 of Bugzilla we get empty tags for empty fields. In version 3.6 the tags are not in the output.

Example:

new

<bug_status>CONFIRMED</bug_status>
<resolution/>
<bug_file_loc/>
<status_whiteboard/>
<keywords/>
<priority>Lowest</priority>

and old

<bug_status>NEW</bug_status>
<priority>Lowest</priority>

as an result of this we get an list with an empty String and not an empty list. This is only an migration problem.

When we change this we must implement an smarter version of TaskAttributDiff.hasChanges().

Thoughts?
Comment 4 Frank Becker CLA 2012-01-08 15:24:32 EST
Steffen,

you can fix this by add the following lines in SaxMultiBugReportContentHandler.endElement(String uri, String localName, String qName)
after the line

		String parsedText = characters.toString();

insert the next three lines

		if (parsedText.equals("")) { //$NON-NLS-1$
			return;
		}
Comment 5 Frank Becker CLA 2012-01-08 15:24:45 EST
Created attachment 209178 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2012-01-09 10:20:17 EST
Thanks for investigating that! We should add a test case and back port this to 3.6.5.
Comment 7 Frank Becker CLA 2012-01-12 13:19:44 EST
Steffen,

please use c8345e59018b2b81dd2fe990cbd90b5eddac3db7 for backport this.
Comment 8 Frank Becker CLA 2012-01-12 13:19:46 EST
Created attachment 209399 [details]
mylyn/context/zip
Comment 9 Steffen Pingel CLA 2012-01-17 14:07:32 EST
*** Bug 368847 has been marked as a duplicate of this bug. ***
Comment 10 Steffen Pingel CLA 2012-01-17 14:11:29 EST
This caused a regression with bugs that have empty descriptions:

org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
	at org.eclipse.mylyn.tasks.core.data.TaskAttribute.setValue(TaskAttribute.java:563)
	at org.eclipse.mylyn.internal.bugzilla.core.SaxMultiBugReportContentHandler.addDescription(SaxMultiBugReportContentHandler.java:682)
	at org.eclipse.mylyn.internal.bugzilla.core.SaxMultiBugReportContentHandler.addDescriptionAndComments(SaxMultiBugReportContentHandler.java:637)
	at org.eclipse.mylyn.internal.bugzilla.core.SaxMultiBugReportContentHandler.endElement(SaxMultiBugReportContentHandler.java:438)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
	at com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:263)
	at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2028)
	at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:901)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at org.eclipse.mylyn.internal.bugzilla.core.AbstractReportFactory.collectResults(AbstractReportFactory.java:123)
	at org.eclipse.mylyn.internal.bugzilla.core.MultiBugReportFactory.populateReport(MultiBugReportFactory.java:48)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.getTaskData(BugzillaClient.java:2140)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler.getMultiTaskData(BugzillaTaskDataHandler.java:367)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.synchronizeTasks(SynchronizeTasksJob.java:305)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.runInternal(SynchronizeTasksJob.java:207)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.run(SynchronizeTasksJob.java:153)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.run(SynchronizeTasksJob.java:129)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I have reverted the commit. Frank, if you have time can you look into covering this in a test case and propose a fix? Thanks!
Comment 11 Frank Becker CLA 2012-01-18 15:16:43 EST
Steffen,

if we want an general solution me mud define if an empty tag is an null String or an empty String.

Otherwise we need to enter code that trade some attributes in one case and other different.

Thoughts?
Comment 12 Frank Becker CLA 2012-01-22 13:02:58 EST
Steffen,

here is a review which fix the problems.
http://review.mylyn.org/216
Comment 13 Frank Becker CLA 2012-01-22 13:03:01 EST
Created attachment 209887 [details]
mylyn/context/zip
Comment 14 Steffen Pingel CLA 2012-01-23 10:21:34 EST
Thanks. If I understand the proposed fix correctly, tags with empty values are now always being ignored? What is the purpose of testFirstEmptyTag? Is that only relevant for nested tags?
Comment 15 Frank Becker CLA 2012-01-29 15:50:37 EST
(In reply to comment #14)
> Thanks. If I understand the proposed fix correctly, tags with empty values are
> now always being ignored?
Yes empty tags for resolution, bug_file_loc, status_whiteboard and keywords need to not set the value to SPACE
> What is the purpose of testFirstEmptyTag? Is that only relevant for nested tags?
Yes example:

...
</thetext>
</long_desc>
...
Comment 16 Steffen Pingel CLA 2012-02-01 06:51:37 EST
Thanks. My sense is that it's too much risk in terms of regressions to backport this change. Since the impact of the bug is minor it should be sufficient to have this fix in master only.
Comment 17 Steffen Pingel CLA 2012-02-09 19:41:09 EST
I think I may have prematurely marked this as resolved. Was the change actually merged into master? I noticed that I see incoming notifications for the status whiteboard even though it has not changed on an internal Bugzilla 3.6 repository when I bootstrap on the change.
Comment 18 Frank Becker CLA 2012-02-24 14:27:40 EST
I recrate the patch and start an new review http://review.mylyn.org/#change,322
Comment 19 Frank Becker CLA 2012-02-24 14:27:43 EST
Created attachment 211601 [details]
mylyn/context/zip
Comment 20 Steffen Pingel CLA 2012-02-25 06:48:06 EST
I have done a little bit of testing and didn't notice any unexpected highlighting. I have pushed the change to master. Thanks for looking into this, Frank!
Comment 21 Steffen Pingel CLA 2012-03-03 06:00:58 EST
I'm now getting a bunch of highlighting for tasks that I had already synchronized. We need a different approach to resolving this.
Comment 22 Steffen Pingel CLA 2012-03-03 06:19:05 EST
I have proposed a fix here: http://review.mylyn.org/354. Frank, can you do a review?
Comment 23 Frank Becker CLA 2012-03-03 10:09:16 EST
I create Patchset 2 with my modifications.

please review.
Comment 24 Frank Becker CLA 2012-03-03 10:09:19 EST
Created attachment 212026 [details]
mylyn/context/zip
Comment 25 Steffen Pingel CLA 2012-03-03 11:34:21 EST
Thanks for the review. I have pushed the latest patch set to master.