#!/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 -i count=${#ref[@]}

    local -a tmp=()
    do_resolved tmp

    ## --------------------------
    ## Construct resolved queries
    ## -------------------------- 
    local query="$(join_by ' OR ' "${tmp[@]}")"

    ## ----------------------------------------
    ## Normalize parens for the composite query
    ## ----------------------------------------
    if [[ ${#ref[@]} -eq 0 ]]; then
        ref+=("$query")
    else
        local buffer
        buffer="$(join_by ' AND ' "(${ref[@]})" "($query)")"
        ref=("$buffer")
    fi
    
    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

    # --resolved-in {start} {end} can resolve join({and,or}) ambiguity
    # [[ -v resolved_start ]] && { ans+=("(Resolved >= $resolved_start)"); }
    # [[ -v resolved_end ]]   && { ans+=("(Resolved <= $resolved_end)"); }
    declare -a joinby=()
    [[ -v resolved_start ]] && { joinby+=("(Resolved >= $resolved_start)"); }
    [[ -v resolved_end ]]   && { joinby+=("(Resolved <= $resolved_end)"); }
    
    if [[ ${#joinby[@]} -lt 2 ]]; then
        ans+=("${joinby[@]}")
    else
        filter="$(join_by ' AND ' "${joinby[@]}")"
        ans+=("(${filter})")
    fi

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

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

    if [[ -v resolved_not_empty ]]; then
        ans+=('(resolved IS NOT EMPTY)')
    elif [[ -v resolved_is_empty ]]; then
        ans+=('(resolved IS EMPTY)')
    fi
    
    return
}

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

# [EOF]
