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

Bug 417729

Summary: Editing repo config setting should prefill initial value in field
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: GitAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, Szymon.Brandys
Version: 3.0Flags: Szymon.Brandys: review+
Target Milestone: 5.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
proposed fix none

Description Mark Macdonald CLA 2013-09-20 17:56:37 EDT
1. Go to the Repositories page, then click on an existing repo.
2. Expand the bottommost section "Configuration (user.*)". You should see some config settings (eg. user.name, user.email)
3. Click the Edit button beside one of the settings.

I expected the popup editor field to be pre-filled with the current value of the setting, but it is empty. This is odd.
Comment 1 Michael Rennie CLA 2013-10-11 11:13:08 EDT
The problem seems to be the way Git is using the commands and the way the command framework works. In this case, they create the 'edit' command once and render it N times, but once the command is created and the command parameter passed in, there is no way to update it prior to rendering (I could be missing something here).

Feels to me like we have a few options
1. create one command / command param instance per entry, which would be more work / more memory use

2. add some sort of callback so that a command / command param can ask for its initial value

3. add the ability to pass in a default value when we want the command rendred
Comment 2 Michael Rennie CLA 2013-10-15 16:34:49 EDT
Created attachment 236506 [details]
proposed fix

Or, I could just pass in a getParameters function and set the value when we create the command parameter.
Comment 3 Michael Rennie CLA 2013-10-15 16:36:36 EDT
Szymon, please have a look at the patch
Comment 4 Michael Rennie CLA 2013-10-21 12:43:39 EDT
(In reply to Michael Rennie from comment #3)
> Szymon, please have a look at the patch

To make things a bit easier I created a pull request: https://github.com/eclipse/orion.client/pull/29
Comment 5 Szymon Brandys CLA 2013-11-26 04:57:10 EST
(In reply to Michael Rennie from comment #4)
> (In reply to Michael Rennie from comment #3)
> > Szymon, please have a look at the patch
> 
> To make things a bit easier I created a pull request:
> https://github.com/eclipse/orion.client/pull/29

Thanks Mike. Merged to master.