Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52906

jira-plugin: FAILED TO EXPORT hudson.plugins.jira.JiraProjectProperty

    XMLWordPrintable

Details

    • JIRA Plugin 3.0.7

    Description

      please check the following issue over at github

      https://github.com/jenkinsci/configuration-as-code-plugin/issues/409

      seems like the getter/setters are taking and returning different objects. 

      proposal:

      • "To keep binary compatibility you could introduce a new property to access sites

       

       

      Attachments

        Activity

          Incompatibility comes from conflicting accessors :

          public void setSites(JiraSite site)

          vs 
          public JiraSite[] getSites()

           

          The later return an array, while the former takes a single argument (and actually don't set value, but add to internal list.

          CasC can't introspect the data type and fail to read current value.

          one could imagine to introduce DescriptorImpl#setSites(Sites[]), but doing so CasC won't be able to distinguish the two set methods :'(

           

           

           

          ndeloof Nicolas De Loof added a comment - Incompatibility comes from conflicting accessors : public void setSites(JiraSite site) vs  public JiraSite[] getSites()   The later return an array, while the former takes a single argument (and actually don't set value, but add to internal list. CasC can't introspect the data type and fail to read current value. one could imagine to introduce DescriptorImpl#setSites(Sites[]), but doing so CasC won't be able to distinguish the two set methods :'(      
          olamy Olivier Lamy added a comment -

          Yup would good to add such method.

          any way to change CasC to prefer the method with the type returned by the getter?

          Otherwise I'm fine to merge the pr. 

          olamy Olivier Lamy added a comment - Yup would good to add such method. any way to change CasC to prefer the method with the type returned by the getter? Otherwise I'm fine to merge the pr. 

          Created https://github.com/jenkinsci/jira-plugin/pull/168 in hopes of getting this resolved

          casz Joseph Petersen (old) added a comment - Created https://github.com/jenkinsci/jira-plugin/pull/168  in hopes of getting this resolved

          Reworking the PR after being stale for a while

          casz Joseph Petersen (old) added a comment - Reworking the PR after being stale for a while

          Currently awaiting review/merge

          casz Joseph Petersen (old) added a comment - Currently awaiting review/merge
          olamy Olivier Lamy added a comment -

          casz this has probably cause   JENKINS-57899 

          olamy Olivier Lamy added a comment - casz this has probably cause    JENKINS-57899  

          easy fix inc olamy

          casz Joseph Petersen (old) added a comment - easy fix inc olamy

          People

            olamy Olivier Lamy
            herrmannhinz Tobias Herrmann Hinz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: