#!/bin/bash
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------

[[ ! -v JCL_resovled ]] && { declare -g -a JCL_resolved=(); }

## --------------------------------------------------------------------
## Intent: Retrieve a list of reason query strings
## --------------------------------------------------------------------
function get_jcl_resolved()
{
    local -n ref=$1; shift

    local -a tmp=()
    do_resolved tmp
    ref+=("$tmp")
    
    local query="$(join_by 'OR' "${tmp[0]}")"
    ref+=("($query)")
    
    return
}

## --------------------------------------------------------------------
## Intent: Retrieve a list of reason query strings
## --------------------------------------------------------------------
function get_jql_reasons()
{
    local -n ref=$1; shift

    ref+=('Cannot Reproduce')
    ref+=('Duplicate')
    ref+=('Fixed')
    ref+=('Incomplete')
    ref+=("Won't Do")
    ref+=("Won't Fix")
    return
}

## --------------------------------------------------------------------
## Intent: Modify search query by ticket resolution
## --------------------------------------------------------------------
function do_resolved()
{
    declare -n ans=$1; shift

    [[ -v resolved_start ]] && { ans+=("(Resolved >= $resolved_start)"); }
    [[ -v resolved_end ]]   && { ans+=("(Resolved <= $resolved_end)"); }

    if [[ -v resolved_excl ]]; then
        filter="$(join_by ',' "${resolved_excl[@]}")"
        declare -p filter
        ans+=( "(resolution NOT IN ($filter))" )
    fi

    if [[ -v resolved_incl ]]; then
        filter="$(join_by ',' "${resolved_incl[@]}")"
        ans+=( "(resolution IN ($filter))" )
    fi

    [[ -v resolved_not_empty ]] \
        && { ans+=('(resolved IS NOT EMPTY)'); } \
        || { true; }
               
    [[ -v resolved_is_empty ]] \
        && { ans+=('(resolved IS EMPTY)'); } \
        || { true; }

    return
}

: # ($?=0) for source $include

# [EOF]
