If we are going to move issues to git.drupalcode.org, then we lose the data to integrate them with the rest of Drupal.org. Change records have an entity reference field to issues, which will have to be replaced somehow.
The referenced issue can indicate that “draft” change records need review. “Review” will either have to be a separate status from draft, or disappear.
Problem Summary
When issues move from Drupal.org to GitLab we'll now longer have access to issue fields and metadata to populate views.
We currently use a view with three displays (Published, Draft, Review) for Change Records: https://www.drupal.org/list-changes/drupal
These views are sorted/filtered by issue metadata fields, and in particular the Review tab(heavily used by Core) shows just the Change Records associated with 'Fixed' or 'Closed-Fixed' issues.
While we can still make views of *link fields* to issues, we won't be able to include fields or meta data for sorting/filtering. Instead, we can use javascript to pull in some data about those issues once we display them.
Proposed Resolution
The change record content type on Drupal.org continues to exist, with all of the same fields except:
- The issue entity references now become multi-value link fields
The views would change in the following way:
- Published
- Works largely the same as today, showing the list of CRs in publication order
- Loses any filtering derived from issue meta data, but retains all filtering/sorting from CR fields
- Draft
- Works largely the same as today, showing the list of CRs in created order
- Loses any filtering derived from issue metadata, but retains all filtering/sorting from CR fields
- We can use client-side javascript to pull in the associated GitLab issue statuses, so that hopefully any CR whose issues are all fixed can be seen at a glance (even if we can't filter on that).
- Review
- Cannot be kept, because we won't have access to GitLab issue statuses to use as query criteria in the View.
- Instead, replaced by the changes to the Draft view above
Next steps:
- Review with core committers
- Review with other users of change records
- Implement
- Deploy
Deployment instructions
- Merge/deploy the code
- cc all & check that features appear as "Default". The new link field should appear in the "Change record" content type.
- If the changes are not reflected, we might need to revert the "drupalorg_change_notice" feature.
- Run
drupalorg_change_notice:issue-links
to populate the new link field with the values from the old entity reference field.
Issue fork drupalorg-3265112
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedAffected field is field_issues
Admin path:/admin/structure/types/manage/changenotice/fields
Comment #4
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedCertain views, like https://www.drupal.org/list-changes/drupal/review rely on the metadata of the issues. By making them links, we might not be able to retrieve the status anymore.
To continue working on this might mean losing certain functionality like ^^, but we can always create follow up issues to see what are the options (ie: query gitlab api to get MR or Issue metadata).
Also, if the issue is part of a change record, it'll have an extra block on the side making reference to the change record. ie: https://www.drupal.org/project/drupal/issues/3280399
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedMy first thought is to use Gitlab issues for the change record itself. Any issue with the label 'Change record' would be considered a change record. Gitlab's issues dont yet allow for custom fields so that's why I suggest using a Label.
Gitlab's excellent query UI would help us make lists, even across projects. Further, issues have a rich UI and data for relating to each other and showing a bit of metadata in the link. We are surely going to be using these for Related Issues. Gitlab's Issue API is available for migration, and any future CRUD work related to change records.
This solution isnt perfect but its good enough IMO, and gets rid of one more custom thing on www.drupal.org
Comment #6
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedThanks for your insights Moshe. Leveraging Gitlab is in fact one of the options being considered (probably the one we like the most long term). The changes in this issue will be about preparing for the issue migration without disrupting (too much) other parts of the site.
I've added a comment to the child issue about using gitlab features for the change records: https://www.drupal.org/project/drupalorg/issues/3293315#comment-14589560
Comment #7
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedComment #8
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commented@drumm - this is ready to be reviewed / tested.
URL: https://fjgarlin-drupal.dev.devdrupal.org
MR: https://git.drupalcode.org/project/drupalorg/-/merge_requests/101/diffs
* drupalorg/drupalorg.module changes the link to use the new format.
* features/drupalorg_change_notice/drupalorg_change_notice.drush.inc adds the drush command
* features/drupalorg_change_notice/drupalorg_change_notice.module adds the logic run in the drush command and a form_alter hook to pre-populate the links if these are given in the URL. It also adds some logic to keep backwards compatibility.
* The rest of the changes are features export from adding the new field and hiding the old one.
Deployment steps:
* Deploy the code and make sure that the feature changes were applied. A new field should be created. If it doesn't happen, we might need to "revert" the feature.
* Run the drush command: "drush drupalorg_change_notice:issue-links"
Changes:
* The old "Issues" entity reference field will no longer be available nor visible.
* A new field "Issue links" is available when viewing/editing/adding change records: https://fjgarlin-drupal.dev.devdrupal.org/node/3260624
* The link "add change notice" present in issues will still prepopulate the value of the link: https://fjgarlin-drupal.dev.devdrupal.org/i/3280589 and then click on "add change notice". You'll be taken here: https://fjgarlin-drupal.dev.devdrupal.org/node/add/changenotice?field_pr...
Once this is deployed, we can fully delete the old field and remove the non-used view displays, but that will break backwards compatibility. I captured this in the child issue: https://www.drupal.org/project/drupalorg/issues/3293585
Comment #9
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedComment #10
hestenetComment #11
hestenetComment #12
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedThe proposed resolution has been implemented and can be tested.
Test:
https://fjgarlin-drupal.dev.devdrupal.org/node/3292914Click on the link in the listinghttps://fjgarlin-drupal.dev.devdrupal.org/project/config_notify/issues/3...Click on the link in the change record detail pageComment #14
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedComment #15
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedNote: the above endpoint has been reset and I'll re-run all the changes early this week, so the test links might not show what you expect if you check between now and then.Fixed
Comment #16
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Drupal Association commentedComment #18
drumm#3295357: Migrate drupal.org issues to gitlab issues has the JS formatting to get the issue status.
Comment #19
drummNoting
cc all
is needed on deployment to pick up the new Views handlers/etc.Comment #21
drummThis is now deployed!