Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Specify ParentID For Conf v2 POST Create Page #210

Open
1 of 5 tasks
squatched opened this issue Jun 5, 2023 · 0 comments · May be fixed by #211
Open
1 of 5 tasks

Unable To Specify ParentID For Conf v2 POST Create Page #210

squatched opened this issue Jun 5, 2023 · 0 comments · May be fixed by #211
Assignees
Labels
bug Something isn't working

Comments

@squatched
Copy link
Contributor

squatched commented Jun 5, 2023

go-atlassian version
Most Recent (v1.5.0)

go-atlassian component

  • Jira Software Cloud
  • Jira Agile Cloud
  • Jira Service Management Cloud
  • Confluence Cloud
  • Atlassian Admin Cloud

Describe the bug 🐛
This bug is a miss in that the request body to POST /wiki/api/v2/pages may include parentId but go-atlassian does not include it in models.PageCreatePayloadScheme.

To Reproduce 🚧
Steps to reproduce the behavior:

  1. Create a new models.PageCreatePayloadScheme
  2. Observe no ParentID member.

Expected behavior
A clear and concise description of what you expected to happen.
Expected a ParentID member.

Screenshots 📄
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Code snippet

package main

import (
	"context"
	"github.com/ctreminiom/go-atlassian/jira"
	"log"
	"os"
)

func main() {

	var (
		host  = os.Getenv("HOST")
		mail  = os.Getenv("MAIL")
		token = os.Getenv("TOKEN")
	)

	jiraCloud, err := jira.New(nil, host)
	if err != nil {
		return
	}

	jiraCloud.Auth.SetBasicAuth(mail, token)
	jiraCloud.Auth.SetUserAgent("curl/7.54.0")

	// Steps to reproduce
	payload := &models.PageCreatePayloadScheme{
		SpaceID:  203718658,
		Status:   "current",
		Title:    "Page create title test",
		ParentID: 12345678,       // <- Compile error: "Unknown field 'ParentID' in struct literal"
	}
}
@squatched squatched added the bug Something isn't working label Jun 5, 2023
@squatched squatched linked a pull request Jun 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants