You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to retrieve the ProjectV2 fields of an issue and may need to update one depending on its value.
While I can successfully retrieve the project number and title, I’m unable to fetch the names and values of the associated fields.
Could you provide a basic example for retrieving those fields and their values?
This is a GraphQL version very close to what I’m trying to achieve.
It currently retrieves all the issues in the project because I couldn’t figure out how to filter for a specific issue.
{
repository(owner: "owner", name: "repo") {
issue(number: issueNumber) {
projectV2(number: projectNumber) {
items(first: 20) {
nodes {
content {
...onIssue {
repository {
name
}
numbertitle
}
}
fieldValues(first: 20) {
nodes {
...onProjectV2ItemFieldDateValue {
idfield {
...onProjectV2FieldCommon {
name
}
}
date
}
...onProjectV2ItemFieldSingleSelectValue {
idfield {
...onProjectV2FieldCommon {
name
}
}
name
}
...onProjectV2ItemFieldTextValue {
idfield {
...onProjectV2FieldCommon {
name
}
}
text
}
...onProjectV2ItemFieldNumberValue {
idfield {
...onProjectV2FieldCommon {
name
}
}
number
}
...onProjectV2ItemFieldIterationValue {
idfield {
...onProjectV2FieldCommon {
name
}
}
iterationId
}
}
}
}
}
}
}
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m trying to retrieve the ProjectV2 fields of an issue and may need to update one depending on its value.
While I can successfully retrieve the project number and title, I’m unable to fetch the names and values of the associated fields.
Could you provide a basic example for retrieving those fields and their values?
Additional context
This is a GraphQL version very close to what I’m trying to achieve.
It currently retrieves all the issues in the project because I couldn’t figure out how to filter for a specific issue.
Beta Was this translation helpful? Give feedback.
All reactions