Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369132

Summary: Submitted new task remained as unsubmitted task as well
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: major    
Priority: P3 CC: eclipse, robert.munteanu, shawn.minto, steffen.pingel
Version: 3.6Keywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
the submitted but still local task editor
none
The gzipped response received from the post_bug.cgi call
none
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2012-01-19 13:56:54 EST
I created a bugzilla bug (on a non modified Bugzilla repository), submitted it, and the same "new unsubmitted bug" task editor remained open (without bug ID, comments section), having an editor info message "changes submitted".
At the same time I could see that the bug got indeed submitted in the task list (new incoming). But I also still had the task in the unsubmitted category as well.

Nothing in the error log. First time that happened out of hundreds of created bugs on this repository.
Comment 1 Thomas Ehrnhoefer CLA 2012-01-19 13:57:27 EST
Created attachment 209770 [details]
the submitted but still local task editor
Comment 2 Steffen Pingel CLA 2012-01-19 14:14:20 EST
Wow, that's weird. I wonder if that's caused by submitting an empty description. Are you using the latest Mylyn head?
Comment 3 Thomas Ehrnhoefer CLA 2012-01-19 14:17:02 EST
No, it's using installed Mylyn 3.6.4
There was a description though (I just needed to redact it), so it's not an empty description thing I think.
Comment 4 Shawn Minto CLA 2012-01-20 13:25:11 EST
I think that I have seen this once or twice before and I think it happens when the server reports that the creation failed (i.e. message in the header but not logged) but it actually succeeded.
Comment 5 Thomas Ehrnhoefer CLA 2012-01-20 15:21:13 EST
The message in the header (of the still local task) was that it succeeded though. I clicked it, and it reported correct things (can't remember exactly what).
Comment 6 Steffen Pingel CLA 2012-02-14 09:32:48 EST
*** Bug 371481 has been marked as a duplicate of this bug. ***
Comment 7 Robert Munteanu CLA 2012-03-14 10:49:35 EDT
I've been bothered enough by this to capture a wireshark trace of the conversation going on with the WineHQ bugzilla ( where this happens every time ).

On a high level, I get the following calls:

bc. 
POST /index.cgi ( user login )       -> HTTP/1.1 200 OK
POST /post_bug.cgi (  bug creation ) -> HTTP/1.1 200 OK
POST /show_bug.cgi ( bug load )       ->  HTTP/1.1 200 OK

The third call is more interesting . The id value of the bug is

bc. 
id=zilla+%26ndash%3B+bug+30164&ctype=xml&excludefield=attachmentdata

Bugzilla obviously complains about an invalid bug id

bc.. 
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.winehq.org/bugzilla.dtd">

<bugzilla version="4.0.2"
          urlbase="http://bugs.winehq.org/"
          
          maintainer="wine-bugs@winehq.org"
          exporter="robert.munteanu@gmail.com"
>

    <bug error="InvalidBugId">
      <bug_id>zilla &amp;ndash; bug 30164</bug_id>
    </bug>

</bugzilla>

p. It looks like the the bug id is not extracted correctly.
Comment 8 Robert Munteanu CLA 2012-03-14 10:50:11 EDT
Created attachment 212660 [details]
The gzipped response received from the post_bug.cgi call
Comment 9 Frank Becker CLA 2012-03-18 09:25:08 EDT
I think I found the reason for this problem.

When we have an new bug we try to get the id from the <title> tag.

In your case the title is 
<title>WineHQ Bugzilla &ndash; Bug ??? Submitted &ndash; summary</title>

and not with the expected <title>Bug ??? Submitted &ndash; summary</title>

When you change your customized template to <title>WineHQ &ndash; Bug ??? Submitted &ndash; summary</title> this will work.

Reason is that we look for the first Bug substring in the title and assume that all between this and the Submitted is the bug id.

In your case we get "zilla &ndash; Bug ???" as the id.
Comment 10 Steffen Pingel CLA 2012-03-19 02:18:31 EDT
Thanks for looking in this! Frank, the parsing and validation in the Bugzilla connector needs to be improved to handle this case more gracefully.
Comment 11 Frank Becker CLA 2012-03-21 16:35:49 EDT
Actual we use the following to extract the bug ID.

In the LanguageSettings we the following two list fields "submitted" and "bug". For the default this are 
		enSetting.addLanguageAttribute("submitted", "Submitted"); //$NON-NLS-1$ //$NON-NLS-2$
		enSetting.addLanguageAttribute("submitted", "posted"); //$NON-NLS-1$ //$NON-NLS-2$
		enSetting.addLanguageAttribute("bug", "Bug"); //$NON-NLS-1$ //$NON-NLS-2$
		enSetting.addLanguageAttribute("bug", "Issue"); //$NON-NLS-1$ //$NON-NLS-2$
with the following Pattern:
{bug}bugID{submitted}

We have the following ways to fix this:
1) add an UI to change the LanguagSetting per repository so we change "Bug" to "WineHQ Bugzilla &ndash; Bug" 
2) try to find the words from LanguagSetting "bug" in the substring when we the substring contains non numeric chars.
3) read only the numeric and whitespace chars before "submitted" and do no longer use "bug" in this place.

Thoughts?
Comment 12 Frank Becker CLA 2012-03-21 16:35:52 EDT
Created attachment 213024 [details]
mylyn/context/zip
Comment 13 Steffen Pingel CLA 2012-05-23 17:08:04 EDT
We are out of time for 3.8 to address this but we can take another look for 3.9.

(In reply to comment #11)
> We have the following ways to fix this:
> 1) add an UI to change the LanguagSetting per repository so we change "Bug" to
> "WineHQ Bugzilla &ndash; Bug"

I'd prefer if we didn't complicate the repository settings further.

> 2) try to find the words from LanguagSetting "bug" in the substring when we the
> substring contains non numeric chars.

That sounds reasonable to me.

> 3) read only the numeric and whitespace chars before "submitted" and do no
> longer use "bug" in this place.

That seems like the best approach.
Comment 14 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn