Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-6013

Unable to specify the publishDate of a blog entry using the SOAP API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 2.2.1
    • 2.1.5
    • None

      I am trying to generate a news entry in a space using the SOAP API. Even if I specify a publishDate, the news is always published with the date at which I invoked the SOAP method:

      Code to reproduce:

      // Get the confluence service
      ConfluenceSoapService confluenceService = getConfluenceService();
      final String authToken = confluenceService.login(USERNAME, PASSWORD);

      // Build the comment
      RemoteBlogEntry news = new RemoteBlogEntry();
      news.setContent("Fake news auto-generated by JUnit tests");

      // Use another publish date
      final Calendar publishDateCalendar = Calendar.getInstance();
      publishDateCalendar.set(Calendar.YEAR, 2005);
      publishDateCalendar.set(Calendar.MONTH, 6);
      publishDateCalendar.set(Calendar.DAY_OF_MONTH, 24);
      news.setPublishDate(publishDateCalendar);

      news.setTitle("Fake news (JUnit test please ignore)");
      news.setSpace("TEST");

      // Publish the news
      confluenceService.storeBlogEntry(authToken, news);

      confluenceService.logout(authToken);

      This is blocking the migration of our portal system to confluence ...

              Unassigned Unassigned
              17b12069583b Stephane Nicoll
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: