Table of contents
    No headers
    var issues = $0 ?? $issues ?? [ ];
    var options = $1 ?? $options ?? {
        showAssignee: true,
        showHours: false,
        showClient: false
    };
    
    <ol>
        foreach(var issue in issues) {
            <li>
                var label;
                var assignee = options.showAssignee ? <span> ' - '; (!#issue.assignee ? <span style=('color: red;')>'unassigned';</span> : issue.assignee)</span> : nil;
                var hours = options.showHours ? <span> ' ('; issue.fields['Hours Left'] ?? '4'; ' Hours)' </span> : nil;            
                var style = issue.resolved ? 'text-decoration: line-through; color: grey;' : (issue.state == 'In Progress' ? 'font-weight: bold;' : nil);
                var client;
                var stop;
                if(options.showClient && (issue.fields['Client Services'] ?? 'Yes') === 'Yes') {
                    if(issue.fields['Client Name']) {
                        let client = <span><img alt="Client Services" src="http://bjorg.s3.amazonaws.com/Share/dollar.png"/> &nbsp;; "["; issue.fields['Client Name']; "]"; &nbsp;; </span>;
                    } else {
                        let client = <span><img alt="Client Services" src="http://bjorg.s3.amazonaws.com/Share/dollar.png"/> &nbsp; </span>;
                    }
                } else if(options.showBlocked && issue.state === 'Blocked') {
                    let stop = <span><img alt="Blocked" src="http://bjorg.s3.amazonaws.com/Share/stop.png"/> &nbsp; </span>;
                }
                switch(issue.priority) {
                case 0:
                    let label = <span> <span style=(style)> stop; client; issue.id .. ' - '; <font color="red"> "(show-stopper) "; </font> issue.summary; hours; </span> assignee; </span>;
                case 2:
                    let label = <span> <span style=(style)> stop; client; issue.id .. ' - '; <font color="red"> "(critical) "; </font> issue.summary; hours; </span> assignee; </span>;
                case 3:
                    let label = <span> <span style=(style)> stop; client; issue.id .. ' - '; <font color="red"> "(major) "; </font> issue.summary; hours; </span> assignee; </span>;
                case 5:
                    let label = <span> <span style=(style)> stop; client; issue.id .. ' - '; <font color="silver"> "(minor) "; </font> issue.summary; hours; </span> assignee; </span>;
                default:
                    let label = <span> <span style=(style)> stop; client; issue.id .. ' - ' .. issue.summary; hours; </span> assignee; </span>;
                }
                
                // show link
                youtrack.issuelink{
                    id: issue.id,
                    text: label,
                    target: '_blank'
                };
            </li>
        }
    </ol>
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by