Project-related events in issues' timelines (V2 projects) #49602
Replies: 10 comments 2 replies
-
There are also no For regular issues it just returns nothing anyway, I tried both the query in the main comment as well as the one below.
|
Beta Was this translation helpful? Give feedback.
-
I also found it missing in my case and this is basically a blocker for me right now :| |
Beta Was this translation helpful? Give feedback.
-
Doesn't work for me either. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem, and since this data is crucial for analytics purposes, I'm surprised that it's not returned from an API. |
Beta Was this translation helpful? Give feedback.
-
I also have this problem, and it's blocking the progress of my project. |
Beta Was this translation helpful? Give feedback.
-
I am also looking for similar data. Is there any other ideas on how to get out cycle time of Issues in new projects (Ready - In progress - In review - In testing - Done)? As we are a small team, I am now manually extracting the times from the Issue view for these two events; And adding those to a script to calculate the time between. |
Beta Was this translation helpful? Give feedback.
-
I too need a means to monitor the duration of time spent on each issue status, starting from the issue opened date to the date it was resolved. So this is a blocker for me right now as I need to access the specific dates and times when an issue is moved from one status to another which is missing in the response for new github projects. Do we have any other workarounds for this atm? |
Beta Was this translation helpful? Give feedback.
-
Same issue. Related discussions: |
Beta Was this translation helpful? Give feedback.
-
There are several threads on this issue as @jesuslinares notes. Commenting here as it seems to have the most comments. It would be nice to get some update, say, an acknowledgment of the bug, some idea whether it will be fixed, how many quarters we should expect to wait. |
Beta Was this translation helpful? Give feedback.
-
I wanted to echo what @e0d shared. I really love using the new projects, and having these events actually captured is a relief so that in theory it is possible to understand the state of a Project at any given point in time. I've been trying for a few days trying different combinations of elements in the GraphQL API to try to see if there is some specific permutation that works. I would really appreciate even an acknowledgement of the issue so that I don't keep searching in hope for some magic combination that will unlock these objects and attributes. I understand that part of this feature is supposed to currently be behind Schema preview, which doesn't work with the Explorer so you have to run separate from the Explorer. But part of this feature shouldn't require preview headers. And given that in general users can't any longer create Classic Projects
the only way for most users to make use of this documented feature is through new (non-classic) Project. Really hacky workaroundI don't think this will be useful for large projects with many users and many associated repos. However it's the only solution that I have found so far that does part of what I need. I query the GraphQL API to get the last updated date of the "Status" of an issue query {
repository(owner: "Galadirith", name: "repo-name") {
resourcePath
issue(number: 239) {
projectItems(last:100) {
totalCount
nodes {
__typename
updatedAt
fieldValueByName(name: "Status") {
... on ProjectV2ItemFieldSingleSelectValue {
name
}
}
}
}
timelineItems (first:100) {
updatedAt
}
}
}
} in one example I got back this
showing the From here I then filter the issues based on the from bs4 import BeautifulSoup as BS
import requests
device_id = 'your-device-id'
user_session = 'your-user-session'
headers = {
'authority': 'github.com',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'accept-language': 'en-GB,en-US;q=0.9,en;q=0.8',
'cache-control': 'no-cache',
'cookie': (
'tz=Europe%2FLondon; '
f'_device_id={device_id}; '
f'user_session={user_session}; '
'logged_in=yes; '
'dotcom_user=Galadirith; '),
'pragma': 'no-cache',
'sec-ch-ua': '"Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'same-origin',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'user-agent': 'your-user-agent'
}
response = requests.get('https://github.com/Galadirith/repo-name/issues/239', headers=headers)
soup = BS(response.content, 'html.parser')
timeline_items = soup.find_all('div', class_='TimelineItem-body')
for item in timeline_items:
if 'moved this from' in item.text:
print(
[s.get_text().strip() for s in item.find_all('strong')],
[a.get_text().strip() for a in item.select('[href*="projects"]')],
[t['datetime'] for t in item.select('.Link--secondary > relative-time')]
) That gives me back something like
It's all really hacky, others might have tried something similar, but wanted to share as a terrible demo of some way to get some sort of really bad procedural logic into getting these invisible issue event. References
|
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
Hello,
I'm trying to retrieve an issue timeline for an issue added to a new (non-classic) GitHub project. I use the following query for this purpose:
I added the issue to the project and changed the status of the issue several times. However, the query returns no events related to the project (AddedToProjectEvent, ConvertedNoteToIssueEvent, MovedColumnsInProjectEvent). I see other events, like the issue assignment or comments, but no project-related events. I expect that the issue timeline will contain all events, including the issue status changes in the project. I tried to add preview schemes, but it didn't help me. The query result looks like this:
The same query works fine when I run it for an issue in a classic project.
Are the project-related events supported for the new (V2) projects? What I'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions