Making WordPress.org

Changeset 12415


Ignore:
Timestamp:
02/22/2023 05:24:35 AM (19 months ago)
Author:
dd32
Message:

Trac: Allow for the task ticket type to be renamed.

This changes the JS to simply look for a ticket type with 'task' in it, rather than the hard-coded 'task (blessed)' text.

See #6783.

Location:
sites/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/site.html

    r12226 r12415  
    55
    66<?python
    7     scripts_version = '210'
     7    scripts_version = '211'
    88    project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0]
    99    wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/'
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r12403 r12415  
    697697            version = parseFloat( elements.version.val() );
    698698
    699             // Remove task (blessed), or make a task ticket read only.
    700             if ( 'task (blessed)' === elements.type.val() ) {
    701                 elements.type.after('<input type="hidden" name="field_type" value="task (blessed)" /> task (blessed)')
     699            // Remove task, or make a task ticket read only. This supports the ticket type being 'task' or 'task (blessed)'
     700            if ( -1 !== elements.type.val().indexOf( 'task' ) ) {
     701                elements.type.after('<input type="hidden" name="field_type" value="' + elements.type.val() + '" /> ' + elements.type.val() )
    702702                    .parent().css('vertical-align', 'middle').end()
    703703                    .remove();
    704704            } else {
    705                 elements.type.find('option[value="task (blessed)"]').remove();
     705                elements.type.find('option[value*="task"]').remove();
    706706            }
    707707
Note: See TracChangeset for help on using the changeset viewer.