[JIRA] (JENKINS-57751) Unable to delete server configuration

9 views
Skip to first unread message

parichay.barpanda@gmail.com (JIRA)

unread,
May 29, 2019, 4:19:01 PM5/29/19
to jenkinsc...@googlegroups.com
Parichay Barpanda created an issue
 
Jenkins / Bug JENKINS-57751
Unable to delete server configuration
Issue Type: Bug Bug
Assignee: Parichay Barpanda
Components: gitlab-branch-source-plugin
Created: 2019-05-29 20:18
Labels: gsoc-2019
Priority: Minor Minor
Reporter: Parichay Barpanda

Running the plugin with `mvn hpi:run`and a GitLab Server is added from the dropdown in Global Config. If no credentials is added to the server and server is tried to be deleted. It doesn't get deleted even upon saving the settings.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

parichay.barpanda@gmail.com (JIRA)

unread,
May 29, 2019, 4:23:02 PM5/29/19
to jenkinsc...@googlegroups.com
Parichay Barpanda commented on Bug JENKINS-57751
 
Re: Unable to delete server configuration

Only happens when there is only 1 GitLab Server configuration.

parichay.barpanda@gmail.com (JIRA)

unread,
May 30, 2019, 7:09:02 AM5/30/19
to jenkinsc...@googlegroups.com

This is common to all plugins like GitHub, Gitea etc

parichay.barpanda@gmail.com (JIRA)

unread,
Jun 5, 2019, 9:48:03 AM6/5/19
to jenkinsc...@googlegroups.com
Parichay Barpanda started work on Bug JENKINS-57751
 
Change By: Parichay Barpanda
Status: Open In Progress

parichay.barpanda@gmail.com (JIRA)

unread,
Jun 5, 2019, 2:17:02 PM6/5/19
to jenkinsc...@googlegroups.com

parichay.barpanda@gmail.com (JIRA)

unread,
Jun 6, 2019, 10:11:01 AM6/6/19
to jenkinsc...@googlegroups.com
 

This issue was solved by modifying the `configure` method of Global configuration.

Before:

@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
    req.bindJSON(this, json);
    return true;
}

After:

 

@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
    servers = req.bindJSONToList(GitLabServer.class, json.get("servers"));
    save();
    return super.configure(req, json);
}

 

The servers arraylist is updated with changes in Global Configuration UI.

Change By: Parichay Barpanda
Status: In Review Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages