[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2020-04-01 Thread radek.anton...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Radek Antoniuk  closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Fixed via https://github.com/jenkinsci/jira-plugin/pull/168  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Radek Antoniuk   
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2019-04-30 Thread radek.anton...@quiddia.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Radek Antoniuk  updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Radek Antoniuk   
 
 
Labels: 
 jira-plugin-2.3  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2019-04-30 Thread radek.anton...@quiddia.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Radek Antoniuk  stopped work on  JENKINS-41690  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Radek Antoniuk   
 
 
Status: 
 In Progress Open  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.*Steps to Reproduce:*I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I create a JiraSite object, then save it to the instance with "setSites()". Every time I run the Groovy script, however, an additional entry for my single JIRA site is added to my instance.{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL ; // create JiraSite objectURL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)// call setSites() to save the JiraSitedef instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site)jiraPlugin.save(){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to call setSites() as many times as you want, but if you're only ever passing in one JiraSite, then you should end up with one JiraSite in your instance.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 
 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.*Steps to Reproduce:*I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I create a JiraSite object, then save it to the instance with "setSites()". Every time I run the Groovy script, however, an additional entry for my single JIRA site is added to my instance.{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL; // create JiraSite object URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = false  def site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth) // call setSites() to save the JiraSite def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site)jiraPlugin.save(){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to call setSites() as many times as you want, but if you're only ever passing in one JiraSite, then you should end up with one JiraSite in your instance.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 
 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.*Steps to Reproduce:*I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I create a JiraSite object, then save it to the instance with "setSites()". Every time I run the Groovy script, however, an additional entry for my single JIRA site is added to my instance.{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site) instance jiraPlugin .save(){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to call setSites() as many times as you want, but if you're only ever passing in one JiraSite, then you should end up with one JiraSite in your instance.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 

   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.*Steps to Reproduce:*I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I create a JiraSite object, then save it to the instance with "setSites()". Every time I run the Groovy script, however, an additional entry for my single JIRA site is added to my instance.{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site) instance.save() {noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to call setSites() as many times as you want, but if you're only ever passing in one JiraSite, then you should end up with one JiraSite in your instance.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 

  

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.*Steps to Reproduce:*I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I create a JiraSite object, then save it to the instance with "setSites()". Every time I run the Groovy script, however, an additional entry for my single JIRA site is added to my instance.{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to  run this script 10  call setSites() as many  times  and  as you want, but  if you're only ever passing in one JiraSite, then you should end up with one JiraSite  object  in your  config  instance .*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config. *Steps to Reproduce:* I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.    In the Groovy script (see below), I create a JiraSite object, then save it to the instance with "setSites()". Every time I run the Groovy script, however, an additional entry for my single JIRA site is added to my instance. Here's the script I was running: {noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to run this script 10 times and if you're only ever passing in one JiraSite, then you should end up with one JiraSite object in your config.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 

  

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96It is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue specifically is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I  was configuring  create  a JiraSite object, then  saving  save  it to the instance with "setSites()". Every time I  ran  run  the Groovy script, however,  a duplicate  an additional  entry for my single JIRA site  would appear  is added to my instance .      Here's the script I was running:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to run this script 10 times and if you're only ever passing in one JiraSite, then you should end up with one JiraSite object in your config.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 
 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96 The "setSites" method It  is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue  specifically  is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()". Every time I ran the Groovy script, however, a duplicate entry for my single JIRA site would appear.  Here's the script I was running:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  * You should be able to run this script 10 times and if you're only ever passing in one JiraSite, then you should end up with one JiraSite object in your config.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  * If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 

   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}The issue is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config.I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()". Every time I ran the Groovy script, however, a duplicate entry for my single JIRA site would appear.  Here's the script I was running:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.   *   You should be able to run this script 10 times , but  and  if you're only ever passing in one JiraSite, then you should end up with one JiraSite object in your config.*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.   *   If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 

 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat} The issue is that the setSites() is behaving more like an "add site" command.  This can result in duplicate JiraSite objects ending up in your config. I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.      In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()". Every time I ran the Groovy script,  however,  a duplicate entry for my single JIRA site would appear.      Here's the script I was running:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Expected Behavior:** Calling setSites() should behave like a true "set" operation.  You should be able to run this script 10 times, but if you're only ever passing in one JiraSite, then  that's how many  you  should  be on the project  end up with one JiraSite object in your config .*Actual Behavior:* * Calling setSites() is currently behaving like an "add" operation.  If you run this script 10 times, but you're only ever passing in one JiraSite, you'll end up with 10 duplicate JIRA projects configured.  
 

  
 
 
 
 

 
 
 
   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-03 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat} Instead,  I  believe it should be:{noformat}public void setSites(JiraSite site) {sites.clear()sites.add(site);}{noformat}I  first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()". Every time I ran the Groovy script, a  brand new  duplicate entry for my single  JIRA site would appear  in Jenkins -- one, then two, then three, then four, etc .  Here's the script , which will demonstrate the buggy behavior  I was running :{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}* Actual Expected  Behavior:** Calling setSites()  should behave like a true  " n set "  operation.  You should be able to run this script 10  times  results , but if you're only ever passing  in  "n" copies of  one JiraSite, then that's how many should be on  the  JIRA site in the Jenkins instance  project .   :-( * Expected Actual  Behavior:** Calling setSites()  is currently behaving like an  " n add "  operation.  If you run this script 10  times  results , but you're only ever passing  in  ONE copy of your  one JiraSite, you'll end up with 10 duplicate  JIRA  site in your Jenkins instance  projects configured .   
 

  
 
 
 
 

 

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker commented on  JENKINS-41690  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
 Pull request filed here: https://github.com/jenkinsci/jira-plugin/pull/120  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}Instead, I believe it should be:{noformat}public void setSites(JiraSite site) {sites.clear()sites.add(site);}{noformat}I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()". Every time I ran the Groovy script, a brand new JIRA site would appear in Jenkins -- one, then two, then three, then four, etc.  Here's the script, which will demonstrate the buggy behavior:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}*Actual Behavior:* *  Executing this script  Calling setSites()  "n" times results in "n" copies of the JIRA site in the Jenkins instance.  :-(*Expected Behavior:**  Executing this script  Calling setSites()  "n" times results in  1  ONE  copy of your JIRA site in your Jenkins instance.  
 

  
 
 
 
 

 
 
 

 
 
   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker started work on  JENKINS-41690  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Steven Baker  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}Instead, I believe it should be:{noformat}public void setSites(JiraSite site) {sites.clear()sites.add(site);}{noformat}I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.  In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()". Every time I ran the Groovy script, a brand new JIRA site would appear in Jenkins -- one, then two, then three, then four, etc.  Here's the script, which will demonstrate the buggy behavior:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat} * Actual Behavior: * *  Executing this script "n" times results in "n" copies of the JIRA site in the Jenkins instance.  :-( * Expected Behavior: **  Executing this script "n" times results in 1 copy of your JIRA site in your Jenkins instance.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 *Jenkins: v2.44**JIRA plugin: v2.3*In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}Instead, I believe it should be:{noformat}public void setSites(JiraSite site) {sites.clear()sites.add(site);}{noformat}I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.   In the Groovy script (see below), I was configuring a JiraSite object, then saving it to the instance with "setSites()".Every time I ran the Groovy script, a brand new JIRA site would appear in Jenkins -- one, then two, then three, then four, etc. The Groovy script was calling "setSites" every time with just one single site, but the list kept growing. Here's the  Groovy  script  I was running , which will demonstrate  this  the buggy  behavior:  {noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}Actual Behavior: Executing this script "n" times results in "n" copies of the JIRA site in the Jenkins instance.  :-(Expected Behavior: Executing this script "n" times results in 1 copy of your JIRA site in your Jenkins instance.  
 

  
 
 
 
 

 
 
 

 
   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Change By: 
 Steven Baker  
 

  
 
 
 
 

 
 * Jenkins: v2.44 *  * JIRA plugin: v2.3 * In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty.The issue is in the setSites() method here:https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96The "setSites" method is currently written as follows:{noformat}public void setSites(JiraSite site) {sites.add(site);}{noformat}Instead, I believe it should be:{noformat}public void setSites(JiraSite site) {sites.clear()sites.add(site);}{noformat}I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script.Every time I ran the Groovy script, a brand new JIRA site would appear in Jenkins -- one, then two, then three, then four, etc.The Groovy script was calling "setSites" every time with just one single site, but the list kept growing.Here's the Groovy script I was running, which will demonstrate this behavior:{noformat}import hudson.plugins.jira.*import jenkins.model.*import java.net.URL;URL url = "" URL("http://foo.atlassian.net/")URL alternativeUrl = nullString userName = "he...@foo.com"String password = "my-password-here"boolean supportsWikiStyleComment = trueboolean recordScmChanges = trueString userIssuePattern = ""boolean updateJiraIssueForAllBuildStatus = trueString groupVisibility = ""String roleVisibility = ""boolean useHTTPAuth = falsedef site = new JiraSite(url, alternativeUrl, userName, password, supportsWikiStyleComment, recordScmChanges, userIssuePattern, updateJiraIssueForAllBuildStatus, groupVisibility, roleVisibility, useHTTPAuth)def instance = Jenkins.getInstance()jiraPlugin = instance.getDescriptorByType(hudson.plugins.jira.JiraProjectProperty.DescriptorImpl)jiraPlugin.setSites(site){noformat}Actual Behavior: Executing this script "n" times results in "n" copies of the JIRA site in the Jenkins instance.  :-(Expected Behavior: Executing this script "n" times results in 1 copy of your JIRA site in your Jenkins instance.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
   

[JIRA] (JENKINS-41690) JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)

2017-02-02 Thread pack...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Steven Baker created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41690  
 
 
  JiraProjectProperty.setSites() doesn't set sites, it adds them (resulting in duplicate sites)   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 jira-plugin  
 
 
Created: 
 2017/Feb/03 5:39 AM  
 
 
Labels: 
 jira-plugin-2.3  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Steven Baker  
 

  
 
 
 
 

 
 Jenkins: v2.44 JIRA plugin: v2.3 In v2.3 (currently the latest) of the JIRA plugin, I believe there is a bug in JiraProjectProperty. The issue is in the setSites() method here: https://github.com/jenkinsci/jira-plugin/blob/7600eb9c12559119d9599cdeaa088862a5c6dfc3/src/main/java/hudson/plugins/jira/JiraProjectProperty.java#L94-L96 The "setSites" method is currently written as follows: 

 
public void setSites(JiraSite site) {
sites.add(site);
}
 

 Instead, I believe it should be: 

 
public void setSites(JiraSite site) {
sites.clear()
sites.add(site);
}
 

 I first noticed this tonight when attempting to configure the JIRA plugin with a Groovy script. Every time I ran the Groovy script, a brand new JIRA site would appear in Jenkins – one, then two, then three, then four, etc. The Groovy script was calling "setSites" every time with just one single site, but