[JIRA] (JENKINS-36928) Job PO does not accurately reflects the real job underlying state
Title: Message Title Raul Arabaolaza updated JENKINS-36928 Jenkins / JENKINS-36928 Job PO does not accurately reflects the real job underlying state Change By: Raul Arabaolaza Status: In Progress Review 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-36928) Job PO does not accurately reflects the real job underlying state
Title: Message Title Raul Arabaolaza started work on JENKINS-36928 Change By: Raul Arabaolaza 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-36928) Job PO does not accurately reflects the real job underlying state
Title: Message Title Manuel Recena Soto updated an issue Jenkins / JENKINS-36928 Job PO does not accurately reflects the real job underlying state Change By: Manuel Recena Soto Consider the following code{code:java}FreeStyleJob j = jenkins.jobs.create(FreeStyleJob.class, "simple-job");j.configure();j.addParameter(StringParameter.class).setName("Param1").setDefault("");j.save();jenkins.jobs.copy(j, "simple-job-copy");assertThat(driver, hasContent("simple-job-copy"));FreeStyleJob k = jenkins.jobs.get(FreeStyleJob.class, "simple-job-copy");j.visit("config.xml");String jxml = driver.getPageSource();k.visit("config.xml");String kxml = driver.getPageSource();assertThat(jxml, is(kxml));assertTrue(k.getParameters().size() == j.getParameters().size());assertTrue(k.getParameters().containsAll(j.getParameters()));{code}It fails because ` {{ Job.getParameters() ` }} is not backed by the real job conf (as is for example ` {{ Job.getNextBuildNumber() ` }} and ` {{ Job.get() ` }} does not take into account existing state or conf of the job to create the PO. Resulting in situations where the Job PO seems to have no build parameters but the real job has. This makes methods like ` {{ Job.scheduleBuild(params) ` }} not working for this objects. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
[JIRA] (JENKINS-36928) Job PO does not accurately reflects the real job underlying state
Title: Message Title Raul Arabaolaza created an issue Jenkins / JENKINS-36928 Job PO does not accurately reflects the real job underlying state Issue Type: Task Assignee: Raul Arabaolaza Components: acceptance-test-harness Created: 2016/Jul/25 5:27 PM Priority: Minor Reporter: Raul Arabaolaza Consider the following code FreeStyleJob j = jenkins.jobs.create(FreeStyleJob.class, "simple-job"); j.configure(); j.addParameter(StringParameter.class).setName("Param1").setDefault(""); j.save(); jenkins.jobs.copy(j, "simple-job-copy"); assertThat(driver, hasContent("simple-job-copy")); FreeStyleJob k = jenkins.jobs.get(FreeStyleJob.class, "simple-job-copy"); j.visit("config.xml"); String jxml = driver.getPageSource(); k.visit("config.xml"); String kxml = driver.getPageSource(); assertThat(jxml, is(kxml)); assertTrue(k.getParameters().size() == j.getParameters().size()); assertTrue(k.getParameters().containsAll(j.getParameters())); It fails because `Job.getParameters()` is not backed by the real job conf (as is for example `Job.getNextBuildNumber()` and `Job.get()` does not take into account existing state or conf of the job to create the PO. Resulting in situations where the Job PO seems to have no build parameters but the real job has. This makes methods like `Job.scheduleBuild(params)` not working for this objects.