The body field title on project issues does not respect the setting at admin/content/types/project-issue because this hunk in project_issue module hard-codes it:

  $form['issue_details']['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Description'),
    '#default_value' => $node->body,
    '#rows' => 10,
    '#required' => TRUE,
  );
  $form['issue_details']['format'] = filter_form($node->format);

Looks like it should be calling node_body_field() instead like Blog module does.

CommentFileSizeAuthor
#1 project_issue_labels.patch1.63 KBwebchick

Comments

webchick’s picture

Title: Body field title hard-coded as "Description" » Body and Title field labels are hard-coded
Status: Active » Needs review
StatusFileSize
new1.63 KB

Ok, this seems to fix it.

I added an upgrade path for the Body field label, since it would be fairly jarring if that suddenly became "Body" instead of "Description".

dww’s picture

The code looks fine. Is this tested and cool?

webchick’s picture

Well, I tested it, yeah, and it's deployed on the issue-summaries sandbox. But it could probably use a second set of eyes.

dww’s picture

Status: Needs review » Fixed

Woo hoo, 13 months later, but now fixed. ;) There were a few problems with the patch so I had to re-roll:

  • N from hook_update_N() was (obviously) stale. ;)
  • we want to set the default body_label in hook_node_info()
  • update_sql() returns an array, but it's meant to be used as a subarray from the thing you return from hook_update_N(), not the return value itself. So instead of this:
    $ret = update_sql("UPDATE {node_type} SET body_label = ...
    We need this:
    $ret[] = update_sql("UPDATE {node_type} SET body_label = ...

Otherwise, this was working as expected, so I committed and pushed to 6.x-1.x. Thankfully, we're no longer doing our own custom node type via hook_node_info() in D7, so this doesn't need to be ported to that branch.

Cheers,
-Derek

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.