View Issue Details

IDProjectCategoryView StatusLast Update
0012098mantisbtcustomizationpublic2014-02-14 09:16
Reporterphoenixcreation Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Product Version1.2.1 
Summary0012098: Due Date Required
Description

How do you go about making the due_date required? I've been playing with the base functions in bug_api.php but the job always goes through, even when blank. We've been using a required custom field, but the due date field works much better with this one exception.

TagsNo tags attached.

Activities

phoenixcreation

phoenixcreation

2010-06-20 18:58

reporter   ~0025933

Worked with a friend of mine and figured it out. For posterity: due_date is never actually blank, which is why the normal is_blank would not take. due_date defaults to 1. So in bug_api in the validate function:

    if( $p_update_extended ) {
        # due_date field cannot be empty
        if( ( $this->due_date == 1 ) ) {
            error_parameters( lang_get( 'due_date' ) );
            trigger_error( ERROR_EMPTY_FIELD, ERROR );
        }
    }

For good measure, updated bug_report_page with the required * as well:

<span class="required">*</span>

Please close out as needed.

atrol

atrol

2014-02-02 11:49

developer   ~0039294

Writing a custom validation function would also fix the issue without changing existing MantisBT code.