New custom field not accessible
- Ngôn ngữ chính
- JavaScript
- Star
- 36
- Fork
- 10
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Please avoid duplicates
- [X] I checked [all open bugs](https://github.com/gr2m/github-project/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and none of them matched my problem.
### Reproducible test case
_No response_
### Please select the environment(s) that are relevant to your bug report
- [ ] Browsers
- [X] Node
- [ ] Deno
### Versions
NodeJs: v18.18.2
github-project: 5.4.0
### What happened?
I have a weird issue: Some of the newly created custom fields cannot be found. I created different fields with different types but nothing works. Interestingly old custom fields that I created a while back work fine.
```
const options = {
owner: "xxx",
number: 2,
token: "xxx",
fields: {
priority: "Priority",
milestone: "Milestone",
Estimate: { name: "Estimate", optional: true },
lastUpdate: { name: "Last Update", optional: true },
},
};
const project = new GitHubProject(options);
const data = await project.items.list();
console.log(data[0]);
```
results in getting the right object, but the `Estimate` custom field is missing.
Running this:
```
const data = await octokit.graphql(`
query {
node(id: "PVT_kwDOAYW1RM4AAzYZ") {
... on ProjectV2 {
items(first: 20) {
nodes {
id
fieldValues(first: 20) {
nodes {
... on ProjectV2ItemFieldNumberValue {
field {
... on ProjectV2Field {
name
}
}
number
id
updatedAt
creator {
url
}
}
}
}
}
}
}
}
}
`);
console.log(data.node.items.nodes[0].fieldValues.nodes);
```
results in
```
[
{},
{},
{},
{},
{},
{},
{},
{},
{
field: { name: 'Estimate' },
number: 15,
id: 'PVTFNV_lQDOAYW1RM4AAzYczgJ_92DOB0nF8A',
updatedAt: '2023-11-05T00:20:25Z',
creator: { url: 'https://github.com/bobinrinder' }
},
{}
]
```
So looks like the name is set correctly. Any ideas? 🧐
### Would you be interested in contributing a fix?
- [x] yes
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách chạy ví dụ Node và so sánh items.list() với phản hồi fieldValues thô của GitHub GraphQL. Theo dõi entry point của items.list() và đường dẫn phân tích các trường tùy chỉnh; hoàn tất khi các trường mới được tạo, chẳng hạn như Estimate, được trả về nhất quán với dữ liệu GraphQL.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github, graphql, javascript, node.js
- Lĩnh vực
- api, backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100