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

Bug 173352

Summary: Make parsed post success string/regexp a preference
Product: z_Archived Reporter: Robert Elves <robert.elves>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: abuehler, altlist, eclipse, mcesar, mik.kersten
Version: unspecified   
Target Milestone: 2.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch
none
mylyn/context/zip
none
Patch New implementation as in comment 9 and comment 11
none
Patch New implementation as in comment 9 and comment 11
none
mylyn/context/zip
none
cleanup
none
mylyn/context/zip none

Description Robert Elves CLA 2007-02-07 16:33:21 EST
From bug#169556 comment#14: With my localized (to Brazilian portuguese) inhouse bugzilla repo, I get the same error. The title doesn't contains "processed", it is "Ticket processado", in fact. It is not better to configure this title in the preferences?

We want to avoid polluting the preference page so perhaps we should make this into a preference file.  Note that the new bugzilla rpc interface will eliminate the need for this html screen scraping.
Comment 1 Robert Elves CLA 2007-06-27 14:39:23 EDT
Need to defer and will try to get to this early in 3.0 cycle.
Comment 2 Frank Becker CLA 2007-09-15 17:38:48 EDT
*** Bug 202214 has been marked as a duplicate of this bug. ***
Comment 3 Frank Becker CLA 2007-09-15 17:46:38 EDT
If I can reproduce this I can work on a patch.

But if I see it right I have to download/install an old version (bugzilla 2.18) with pt_BR to verify.

Hope I can do this with my MacBook Pro.
Comment 4 Frank Becker CLA 2007-09-16 16:46:57 EDT
I try to get this with my installed bugzilla 3.0.1 and Germzilla but all worked fine. So I take a closer look and find that only if I change bugzilla directory /template/en/default I get the reported problems.

Can you please verify if /template/en/default is changed in your bugzilla installations?



Comment 5 Mik Kersten CLA 2007-09-17 21:42:19 EDT
Frank: fyi Rob is currently on vacation and will be back next week.  Btw, you're moving your way up the Team page :)  http://www.eclipse.org/mylyn/team/
Comment 6 Frank Becker CLA 2007-09-18 18:01:55 EDT
Created attachment 78692 [details]
Patch

Here is the patch.

But some questions

1) Is it OK to change the signiture of some methods of BugzillaClient or do we better define a new classvariable wit getter/setter

2) Is it OK to do the extention of the BugzillaRepositorySettingsPage within createAdditionalControls but not as the parent of this.

3) Where is the right point to implement the setting of the defaults of the new properties witout opening the BugzillaRepositorySettingsPage

4) What jUnit test did you think we need
Comment 7 Frank Becker CLA 2007-09-18 18:02:07 EDT
Created attachment 78693 [details]
mylyn/context/zip
Comment 8 Robert Elves CLA 2007-09-26 16:58:30 EDT
Sorry for delay Frank, busy with release and catch up but will review and answer your questions asap.
Comment 9 Robert Elves CLA 2007-10-04 23:41:50 EDT
This is looking great so far Frank. just a couple thoughts:

When BugzillaClient is created it is passed all properties held by the TaskRepository:

client = BugzillaClientFactory.createClient(taskRepository.getUrl(), taskRepository.getUserName(),
					taskRepository.getPassword(), htUser, htPass, taskRepository.getProxy(),
					taskRepository.getCharacterEncoding(), taskRepository.getProperties());
			
			
...we can make use of this rather than passing the TaskRepository in as a parameter to BugzillaClient methods.

As is, I believe we will need to do some form of migration to apply the default responses to repositories that have already been created and therefore have not yet been edited in the settings page (have no responses set I think).

Regarding the configuration ui, since it is very rare that the user will need to tweak these settings, it would be ideal if we put these into a .properties file on a per repository basis. If the file exists we append the contained key,value pairs to the set of properties past in upon BugzillaClient construction.  What are your thoughts on this?

Reassigning to you Frank.
Comment 10 Frank Becker CLA 2007-10-05 00:35:51 EDT
 (In reply to comment #9)
> This is looking great so far Frank. just a couple thoughts:
> 
> When BugzillaClient is created it is passed all properties held by the
> TaskRepository:
> 
> client = BugzillaClientFactory.createClient(taskRepository.getUrl(),
> taskRepository.getUserName(),
> taskRepository.getPassword(), htUser, htPass, taskRepository.getProxy(),
> taskRepository.getCharacterEncoding(), taskRepository.getProperties());
> 
> 
> ...we can make use of this rather than passing the TaskRepository in as a
> parameter to BugzillaClient methods.
> 
> As is, I believe we will need to do some form of migration to apply the default
> responses to repositories that have already been created and therefore have not
> yet been edited in the settings page (have no responses set I think).
> 
> Regarding the configuration ui, since it is very rare that the user will need to
> tweak these settings, it would be ideal if we put these into a .properties file
> on a per repository basis. If the file exists we append the contained key,value
> pairs to the set of properties past in upon BugzillaClient construction.  What
> are your thoughts on this?
> 
> Reassigning to you Frank.

Hi Rob,

I read this at work, I look at this over the weekend. Maybe I need some more information like where is the best place for the properties file.
Comment 11 Robert Elves CLA 2007-10-05 01:52:33 EDT
 (In reply to comment #10)
> I read this at work, I look at this over the weekend. Maybe I need some more
> information like where is the best place for the properties file.

For now you could put them in the same folder as is the repository configuration ( .metadata\.plugins\org.eclipse.mylyn.bugzilla.core\ )
Follow BugzillaCorePlugin.setConfigurationCacheFile() and you'll see how this gets set by BugzillaUiPlugin.   So what we could do is in the repository configuration Additional Settings section add a combo box that lists all available .properties files in this folder by short name.  If one is selected, that properties file is applied to the repository.

This facility may best be handled by the TaskRepositoryManager and offered to all connector types. The TaskRepositoryManager would apply the appropriate properties file to the TaskRepository upon loading (if the file exists, if not dump error to log).  The list of available properties files would be provided by by the connector upon request (i.e. when called upon by the AbstractRepositorySettingsPage as part of listing the available options). 
Comment 12 Frank Becker CLA 2007-10-07 16:03:49 EDT
Created attachment 79854 [details]
Patch New implementation as in comment 9 and comment 11

Selecting the language for en and de is includes.

The german strings are not all veryfied. I can not find all of them in the templates.

But what is the place where I can do the Config of the BugzillaLanguageSettings
Comment 13 Frank Becker CLA 2007-10-07 16:04:03 EDT
Created attachment 79855 [details]
Patch New implementation as in comment 9 and comment 11

Selecting the language for en and de is includes.

The german strings are not all veryfied. I can not find all of them in the templates.

But what is the place where I can do the Config of the BugzillaLanguageSettings
Comment 14 Frank Becker CLA 2007-10-07 16:04:39 EDT
Created attachment 79856 [details]
mylyn/context/zip
Comment 15 Robert Elves CLA 2007-10-11 15:26:05 EDT
Awesome Frank. Patch applied, ip log updated. I moved setting of the languages file to the BugzillaUiPlugin (similar to the configuration file).  

Indeed, where should we configure and where to allow contribution of languages? Mik suggested using the templates mechanism (RepositoryTemplate).  If we did this then a plugin could be provided that simply contributes a template for at particular repository along with the appropriate language. The language could be a sub element of the template extension point. Mik, does this sound right to you? Frank what are your thoughts on this? If we proceed I'd like to see this moved to a new bug report.
Comment 16 Frank Becker CLA 2007-10-11 16:49:24 EDT
 (In reply to comment #15)
> Awesome Frank. Patch applied, ip log updated. I moved setting of the languages
> file to the BugzillaUiPlugin (similar to the configuration file).
> 
> Indeed, where should we configure and where to allow contribution of languages?
> Mik suggested using the templates mechanism (RepositoryTemplate).  If we did
> this then a plugin could be provided that simply contributes a template for at
> particular repository along with the appropriate language. The language could be
> a sub element of the template extension point. Mik, does this sound right to
> you? Frank what are your thoughts on this? If we proceed I'd like to see this
> moved to a new bug report.

Yes we should do on of the following in an new bug report.

I think it depends on who should be able to configure the language settings.

* If this is the enduser who is not a bugzilla admin then I think a preference page or a button in the BugzillaRepositorySettingPage. The same in someone use a Bugzilla which has localized templates.
* If you think that Mylyn should set up  all the language settings for the localized bugzilla templates (actually 17) with more then one available versions then I think the templates mechanism should be used. Or is it possible to describe this so that it is so simple tha an enduser can do this?
Comment 17 Frank Becker CLA 2007-10-12 14:29:17 EDT
Created attachment 80264 [details]
cleanup

Sorry I forget to remove some unnessasary code
Comment 18 Frank Becker CLA 2007-10-12 14:29:31 EDT
Created attachment 80265 [details]
mylyn/context/zip
Comment 19 Robert Elves CLA 2007-10-16 14:20:57 EDT
Patch applied. Created bug#206510 to address language configuration.