- Issue created by @hestenet
- πͺπΈSpain fjgarlin
Note that the endpoints come from the
contributin_records
module.A really small summary of the endpoints and options available are here: https://git.drupalcode.org/project/contribution_records/tree/1.0.x#endpo...
- πΊπΈUnited States balsama boston
I'm trying to figure out a way to get an accurate date for when credit was given on a particular issue. In the old API, I could get the date for each of the `issue_credit_comment_info`'s corresponding comments. With the new `contribution_record` endpoint, I only see when the issue itself was created, changed, and last_status_change. None of which give an accurate idea of when the credit was given.
I'm including `paragraph--contributor`. Perhaps that include could include a date attribute?
I should note, that outside of this, the new API is great. I'm able to get everything else that I'm looking for in a single request (which took a dozen or more requests with the old API).
Thanks!
- πΊπΈUnited States hestenet Portland, OR πΊπΈ
@balsama - A couple of clarifications:
The date that a comment is made is when the attribution was made by an individual (as volunteer, on behalf of employer, or on behalf of client(s) - but the credit does not actually get *granted* until the issue maintainer has selected who should receive the credit, and the issue is closed.
So typically the most accurate date of when credit was granted is status_last_changed, whenever status = [any of the closed statuses],
But maybe in your use case it was important/helpful to know when the attributions were made?
The issue with having date-per-attribution, is that the new system is designed for when we switchover to GitLab issues, and those won't have attributions per individual comment, instead contributors will be able to edit their attribution for the whole issue on the credit record.
- πͺπΈSpain fjgarlin
Yes, what @hestenet said.
The date when a credit is given is last_status_change and field_draft is set to 0 (which happens when an issue is closed). That's exactly how our internal systems work to grant credit on users, organizations, marketplace.
- πΊπΈUnited States balsama boston
Thanks for the clarification. I'm most interested in when a fix was actually committed. And I think in most situations,
last_status_change
will be ~2 weeks later than the commit date since status generally changes from Fixed --> Closed (Fixed) about two weeks after a fix has been committed.And, of course, it can be wildly different if an issue is reopened.
That said, without getting into the nuance of what I use the API for, I'll generally be requesting commit credit for issues that have just landed based on Git logs. So the
last_status_change
date will likely still be the change from NR -> Fixed - which is usually the same day the commit was made.Thanks again!