Problem/Motivation

I did some grepping to find @todo items that reference closed issues

grep -r "@todo .*[\r\n]* https://.*drupal.org/.*" . | grep -o  '/[0-9]\+' | while read -r line ; do
     markup=$(curl --silent "https://www.drupal.org/node$line" | hxnormalize -x) 
     status=$(echo $markup |  hxselect '.field-name-field-issue-status .field-item' | sed 's/<\/\?[^>]\+>//g')
     if [[ "$status" == *"Closed"* ]]; then
       echo "[#$line]" | sed 's/\///g'
     fi
 done | uniq

39 were found on the initial run. These should be cleaned up.

See #96 for a script to sort the results.

Proposed resolution

Create child issues for each of the closed @todo items. In that child issue:

  • If it can be confirmed that the @todo is truly addressed in the referenced issue, follow the instructions of the @todo then remove it
  • If the circumstances of the @todo are not truly addressed, find out if the @todo should be referencing a different existing issue, or create a new one to address the needs of the @todo.
  • As issues are completed, update the issue summary to document that, so it's not neccessary to rely on drupal.org dynamically representing the issue status.

Many of these issues can get a novice tag, but this can be omitted if the solution seems like it will be more complex.

Remaining tasks

See if the search used to find these issues can be improved. If additional completed @todos are found, add them to the issue summary.

Follow the steps in proposed resolution. Create child issues and complete them, update the table below as they are updated/completed

The closed @todo issue Will be fixed by
The closed @todo issue Will be fixed by
#540008: Add a container parameter that can remove the special behavior of UID#1
#1461322: Fix AJAX add_css – insert the needed CSS assets after the already-inserted ones
#1668866: Replace drupal_goto() with RedirectResponse #3312091: Update @todos for closed issue https://www.drupal.org/node/1928868
#1843224: Convert Views Ajax commands to new Ajax API
#1848264: Compare and merge PhpWiki diff*.php with MediaWiki's DairikiDiff.php and DiffEngine.php #3346401: Remove @todo from phpcs.xml.dist linking to closed issue
#1928868: Typed config incorrectly implements Typed Data interfaces #3312091: Update @todos for closed issue https://www.drupal.org/node/1928868
#2031223: Add linkByHrefExistsExact and linkByHrefNotExistsExact for matching links by href exactly
#2110591: API/UI for toolkit operations plugin selection
#2149851: Remove todo about GUID field on the 'aggregator_item' entity and add UUID field
#2164373: [META] Untie config validation from form validation — enables validatable Recipes, decoupled admin UIs …
#2351379: [meta] Define, then support exact use cases for link generation and storage
#2362727: Implement __toString() on Translation Annotation
#2451793: [META] Assert Statement Use in Drupal #3295647: Update or remove @todo comment in \Drupal\Component\Datetime\DateTimePlus::__call()
#2458323: CommentNonNodeTest wrong assertion
#2474355: \Drupal\Core\Updater\Updater::makeBackup should probably be removed, and the code path that calls it is broken
#2481833: Remove LanguageNegotiationUrl's usage of base_path()
#2552791: MigrateSqlSource should use dependency injection #3159745: Fix migrate @todo item referencing closed issue
#2607432: SQLite driver does not allow for case insensitive LIKE comparisons on non-ASCII characters
#2744729: Link field should accept protocol-relative URLs
#2746541: Migrate D6 and D7 node revision translations to D8
#2821077: PATCHing entities validates the entire entity, also unmodified fields, so unmodified fields can throw validation errors
#2821724: Create Javascript Tests for Contextual Links
#2824851: EntityResource::patch() makes an incorrect assumption about entity keys, hence results in incorrect behavior
#2892304: Introduce footer region to ContentEntityForm #3337159: Update @todo comment in claro.theme
#2909782: Provide the ability for JS functional tests to track whether the page has been reloaded
#2917885: Add drupalPostFormWithInvalidOptions() to BrowserTestBase
#2938116: Allow media to be uploaded with the Media Library field widget
#2949021: Deprecate schema fallback in ConfigEntityType::getPropertiesToExport
#2958554: Allow creation of file entities from binary data via JSON API requests
#2973356: Cacheability information from route access checker access results are ignored by dynamic_page_cache
#2983179: [META] Implement stricter access checking for the media library
#2988215: Use #element_validate for the upload element in the MediaLibraryUploadForm
#2999549: Allow button tag in LinkGenerator for better accessibility #3156739: Address @todo in claro_preprocess_fieldset__media_library_widget
#3004574: Remove conditional logic from all destination getIds()
#3026221: Unify entity add list theme functions and templates
#3027653: Allow block and layout plugins to determine if they are being previewed
#3057577: Provide a way to add Buttons to Dropbutton
#3057581: Add support for Dropbutton variants
#3099026: Claro's preprocessing of field multiple value form's table header cell removes potential changes by others
#3205480: Drop PECL YAML library support in favor of only Symfony YAML
#3253828: Use static analysis to detect new update functions, to reduce false positives in StagedDBUpdateValidator
#3267040: Remove @todo in migration functional tests
#3284443: Enable unattended updates
#3303126: Make it possible for recipes to prompt for input values
#3325557: Enable more service autowiring by adding interface aliases to core modules
#3347291: Combine field storage and field instance forms
#3348234: Create test trait to set update_test module settings
#3361534: KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate
#3395099: [meta] Allow config types to opt in to config validation, use "FullyValidatable" constraint at root as signal to opt in to "keys/values are required by default"
#3421197: It is impossible for recipes to depend on recipes outside of their own directory
#3453001: Check if composer.lock file exist in composer-lint job

@todo Fixed in a dedicated issue

The closed @todo issue Fixed by
#1029708: History table for any entity #3336491: Link to correct issue in @todo in CommentManager
#1060476: Multiple issues when PostgreSQL is used with non-public schema #3377381: Change hardcoded schema name "public" in SchemaTest::testPgsqlSequences
#2021959: Refactor module handling responsibilities out of DrupalKernel #3202787: Update @todo comment in FunctionalTestSetupTrait
#2268787: Block plugin forms should not rely on being called from \Drupal\block\BlockForm #3337174: Remove @todo linking to closed issue in onfigureBlockFormBase::doBuildForm
#2351015: URL generation does not bubble cache contexts #3373826: Make \Drupal\form_test\Plugin\Block\RedirectFormBlock cachable
#2364011: [meta] External caches mix up response formats on URLs where content negotiation is in use #2725435: Remove outdated @todo pointing to #2364011
#2408013: Adding Assertions to Drupal - Test Tools. #3081646: Follow up for "Adding Assertions to Drupal - Test Tools"
#2427811: ResourceHandler can't serialize a stdClass #3373836: Remove outdated @todo pointing to #2427811 in ResourceResponseSubscriberTest::providerTestSerialization
#2575081: [policy, no patch] Use E_USER_DEPRECATED in Drupal 8 minor releases #3299946: Deprecate theme_render_and_autoescape()
#2752325: Automatically provide HEAD support when a REST resource supports GET #3374874: Add 'HEAD'-method to \Drupal\Tests\rest\Unit\EventSubscriber\ResourceResponseSubscriberTest::providerTestResponseFormat
#2783791: Module install doesn't invalidate render cache #3341113: Remove @todo-comment linking to closed issue in \settings_tray_install
#2805281: ?_format=hal_json error responses are application/json, yet should be application/hal+json #3372783: Re-enable \Drupal\Tests\taxonomy\Functional\Rest\VocabularyJsonAnonTest::testGet
#2881212: Formatting guidelines toggle script relies on Classy selectors #3374031: Remove claro_preprocess_filter_guidelines
#2928906: The field schema incorrectly stores serial fields as int #3159744: Remove manually specified IDs in EntitySchemaTest
#3042127: Off-canvas tabledrag styles do not fully account for "weight" column. #3347648: Remove @todo-comment linking to closed issue in layout-builder.css
#3064914: Views preview adds margin top to views rows #3337462: Update @todo comment in core/themes/claro/css/theme/media-library(.pcss).css
#3097889: Remove deprecated theme functions #3337195: Rename test theme test_legacy_theme
#3010558: Unnecessary <strong> element in Umami's form-element template may produce invalid markup #3361623: Remove outdated @todo in Olivero's datetime-wrapper.html.twig pointing to #3010558
#3018782: Remove extraneous context mapping of layout_builder.entity #3361627: Remove outdated @todo's in layout_builder pointing to #3018782
#3114878: The webkit search cancel button should not be hidden #3337206: Remove normalize-fixes.css
#3135457: Select widths not taken into account when table is rendered #3361465: Remove outdated @todo's pointing to #3135457
#3151019: Only allow route names, deprecate support for route objects in UrlGenerator methods #3354961: Update @todo comment in \Drupal\Core\Routing\UrlGenerator::getRouteStringIdentifier
#3156244: Title variable isn't set by Syndicate block - so the link text is an unfinished sentence #3347919: Address @todo-comment linking to closed issue in feed-icon.html.twig
#3194677: Follow up for #3128548: Add parameters to StatementInterface::fetchObject #3354951: Update @todo comment in \Drupal\Core\Database\StatementInterface::fetchObject
#3219959: Update standard profile so Olivero is the default theme #3347766: Address @todo-comments linking to closed issue [#3219959]
#3223209: deprecate file_save_data, file_copy and file_move and replace with a service #3337162: Use FileRepositoryInterface in \Drupal\file\Upload\FileUploadHandler::loadByUri

User interface changes

API changes

Data model changes

Release notes snippet

Comments

bnjmnm created an issue. See original summary.

bnjmnm’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes

Issue #2552791: MigrateSqlSource should use dependency injection is listed twice in the above list. It is a duplicate of #2681869: Provide clean way to merge configuration into migration plugins which removed a todo and added a new one,

-    // @TODO, remove this in https://www.drupal.org/node/2681869.
-    $destination = $migration->getDestinationConfiguration();
-    if ($destination['plugin'] === 'entity:file') {
+    // @todo Find a way to avoid this in https://www.drupal.org/node/2804611.
+    if ($definition['destination']['plugin'] === 'entity:file') {

The added todo is correct and the issue referenced is open, #2804611: Migrate sources and destinations need a way to get their requirements.

I've updated the table in the IS to show that these migration issue are complete.

bnjmnm’s picture

Issue summary: View changes

I spot three @todos referencing #2552791, a closed issue. Those @todo items should either be removed from the codebase or they should reference a new issue

grep -r "/2552791" .
./modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php:   * @todo Remove when we don't use global. https://www.drupal.org/node/2552791
./modules/migrate/tests/src/Kernel/MigrateTestBase.php:   * @todo Remove when we don't use global. https://www.drupal.org/node/2552791
./modules/migrate/tests/src/Kernel/MigrateTestBase.php:   * @todo Remove when we don't use global. https://www.drupal.org/node/2552791

I removed the duplicate (thanks!), and the "completed", as the grep is still finding references to that closed issue.

xjm’s picture

Version: 9.0.x-dev » 8.8.x-dev

Nice novice meta!

Since these are docs corrections, we'd backport them all the way to the production branch.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

richardbporter’s picture

I tried running the shell script in the description and received the following error multiple times:

sed: 1: "s/<[^]*//g": unbalanced brackets ([])

I installed html-xml-utils via Homebrew on OSX. It's probably not necessary but I'm assuming it makes it easier to find the files and line numbers of these @todos. Any ideas?

richardbporter’s picture

Assigned: Unassigned » richardbporter
bnjmnm’s picture

It’s probably unnecessary to run the script again, it was largely provided to document how the issues were identified. Searching the codebase for the node ids of the issue (such as 2999549 for the last one listed) is the easier + recommended way to find them now that they’ve already been identified.

ballistic101’s picture

In case it is useful, this should fix that script:

grep -r "@todo .*[\r\n]* https://.*drupal.org/.*" . | grep -o  '/[0-9]\+' | while read -r line ; do
     markup=$(curl --silent "https://www.drupal.org/node$line" | hxnormalize -x) 
     status=$(echo $markup |  hxselect '.field-name-field-issue-status .field-item' | sed 's/<[^>]*//g')
     if [[ "$status" == *"Closed"* ]]; then
       echo "[#$line]" | sed 's/\///g'
     fi
 done | uniq

The [^] needed to be [^>].

richardbporter’s picture

richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
richardbporter’s picture

Issue summary: View changes
quietone’s picture

Assigned: richardbporter » Unassigned

@richardbporter, thanks for the updates. To encourage novice contributors I think it would be helpful that this is not assigned to anyone. I hope you don't mind but I am changing to unassigned.

richardbporter’s picture

No, not at all. I wasn't sure if meta issue should be assigned or not.

quietone’s picture

bnjmnm’s picture

Issue summary: View changes

Updated shell command in issue summary to one that works on my updated OS

quietone’s picture

Title: [META] 39 @todo items referencing closed issues » [META] Fix @todo items referencing closed issues
Issue summary: View changes

Used the new script to get an up to date list of issues. Sorted the results and removed the duplicates. Then Updated IS with the results. And finally removed the status column because we can get that information for the status of the issue in the 'fixed by' column.

quietone’s picture

Issue summary: View changes

Really remove the status column.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Issue summary: View changes

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Issue summary: View changes

Ran the grep-script on the current 10.1.x-branch and updated the IS with the current @todos which have a link to a closed d.o. issue.

Sorted the issues by node ID ascending.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Version: 9.5.x-dev » 10.1.x-dev
spokje’s picture

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes

Ran the grep-script on the current 10.1.x-branch and updated the IS with the current @todos which have a link to a closed d.o. issue.

Sorted the issues by node ID ascending.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes

Ran the grep-script on the current 11.x-branch and updated the IS with the current @todos which have a link to a closed d.o. issue.

Sorted the issues by node ID ascending.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue tags: -Novice

Removing `Novice`-tag, since simply opening a new issue for each @todo item referencing closed issues has shown to be non-productive.
Those issue will basically be un-noticed and be stuck in the queue for a long time.

However, opening issues with a proposed solution (even if not accepted) has been proven fruitfull: Either the proposed solution gets committed, or a better approach is suggested.

This is however not exactly novice-material.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes

Found an issue fixing one of these during RTBC queue triage.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes

I wanted to update this so ran the script in the issue summary sending the output to a file, todo-list.txt. There were 51 results and it was difficult to compare with the list in the issue summary. So, I wrote a script to sort the output and create a new table. Of course, I then had to update the second column by hand. It should be easier to maintain in the future if the first column is sorted.

I checked all the children and found a duplicate an updated the table.

#!/bin/bash

cat todo-list.txt | sed 's/\[#\(.*\)]/\1/' | sort -uh > sorted.txt

while read -r line
 do
  echo "<tr><td>[#$line]</td><td></td></tr>"
done < sorted.txt

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.