View Issue Details

IDProjectCategoryView StatusLast Update
0025654mantisbtfeaturepublic2019-04-19 05:09
ReportertheStudent Assigned Todregad  
Status closedResolutionwon't fix 
Product Version2.19.1 
Target VersionFixed in Version 
Summary0025654: Set IDs on custom field rows "<tr>"

I'm requesting a small tweak to the way the custom-field rows are built.

where you have written "<tr>" in your bug forms just turn it to something like
<tr id="<?php echo string_display_line( lang_get_defaulted( $t_def['name'] ) ) ?>">
This piece of code has allowed me to be able to make forms interactive by showing or hiding fields in a form depending on what a user selects.

Let me know what you think.

forms to add new piece of code

TagsNo tags attached.




2019-03-26 15:47

developer   ~0061783

Please submit a pull request on GitHub so we can review your proposed changes.



2019-03-26 18:59

developer   ~0061784

Note that ids have restrictions, which can raise issues:

  • non unique, in bug_view_inc, having the same id for each issue, if your suggestion is to put it in each cell in the issue list.
  • non unique, if the custom field has a name that collides with other already existent ids in the page.
  • contains spaces, if custom field name contains spaces



2019-03-27 09:49

reporter   ~0061786

I did not think of point 2. Let me make a mock up and a GitHub account tonight and ill try to make it more unique. Maybe something like customrow"custom field name".
Is their a problem that occurs when IDs have spaces in them? Because right now I'm able to manipulate those fields that have spaces just fine using jquery.



2019-03-28 06:18

developer   ~0061790

The ids that idetifies each input in bug_report_page already have the info about the field. Those ids are not placed in the TRs, are the ids for the inputs.
For custom fields, their id is present too, with their numeric identifier. For example :

&lt;select tabindex=&quot;6&quot; id=&quot;custom_field_15&quot; name=&quot;custom_field_15&quot; size=&quot;0&quot;> ..  &lt;/select>


2019-03-28 11:08

reporter   ~0061791

Added pull request.



2019-04-03 18:50

reporter   ~0061820

I think your right and i took another look at jquery and i think using the custom field id we can grab the TR using "$(this).closest('tr');". ill try it out tomorrow.



2019-04-03 19:08

developer   ~0061821

we can grab the TR using "$(this).closest('tr');"

yes, that would work. I've succesfully done similar to that in some plugins.



2019-04-04 03:24

developer   ~0061822

After reviewing your proposed change and based on @cproensa's feedback, I don't think there is any point in implementing this considering that it is possible to address the requirement via existing ID's on the custom fields inputs.

I'm therefore resolving this issue.

Issue History

Date Modified Username Field Change
2019-03-26 11:39 theStudent New Issue
2019-03-26 15:47 dregad Status new => feedback
2019-03-26 15:47 dregad Note Added: 0061783
2019-03-26 18:59 cproensa Note Added: 0061784
2019-03-27 09:49 theStudent Note Added: 0061786
2019-03-27 09:49 theStudent Status feedback => new
2019-03-28 06:18 cproensa Note Added: 0061790
2019-03-28 11:08 theStudent Note Added: 0061791
2019-04-03 18:50 theStudent Note Added: 0061820
2019-04-03 19:08 cproensa Note Added: 0061821
2019-04-04 03:24 dregad Assigned To => dregad
2019-04-04 03:24 dregad Status new => resolved
2019-04-04 03:24 dregad Resolution open => won't fix
2019-04-04 03:24 dregad Note Added: 0061822
2019-04-19 05:09 atrol Status resolved => closed