Wiki
Clone wikilambda-plugin / Examples
App provides page where you can build your own views for issue search results with expression columns.
Expression column consists of two configurable elements, template and expression itself. Template provides endless possibilities for visualizing the value. Expression is optional, and is rather useful with default simple template only. Both template and expression can operate with issue
and column
javascript objects. Please see following examples and sample issue object below.
Note, both template and expression are using Angular, see Angular Templates and Angular Expression for additional information.
Time left
This is predefined column, that is implemented using two filters timeLeft and timeLeftLozenge. It should be possible to edit filters within the plugin soon, until that you can request what you need. E.g. look:
Time to resolve
This is predefined column, that is implemented using two filters timeToResolve and timeToResolveLozenge. It should be possible to edit filters within the plugin soon, until that you can request what you need. E.g. look:
Assignee
Template:
<img src="{{issue.fields.assignee.avatarUrls['16x16']}}"/>
<a href="{{$parent.hostBaseUrl}}/browse/{{issue.key}}?jql=assignee={{issue.fields.assignee.name}}"
ng-bind="issue.fields.assignee.displayName" target="_parent"></a>
Timespent
Template:
<span ng-bind="issue.fields.timespent | prettyHours"/>
Rate
Template (default): <span ng-bind="{{column.expression}}"/>
Expression: (issue.fields.rate || 25) | currency
Cost
Template (default): <span ng-bind="{{column.expression}}"/>
Expression: (issue.fields.timespent * (issue.fields.rate || 25) / 3600) | currency
Linked issue
Display linked issue only if it is from certain project. I.e. list TEST issues and see linked DEMO issue, per TEST issue if any.
Template (default): <span ng-bind="{{column.expression}}"/>
Expression: issue.fields.issuelinks[0].inwardIssue.key.startsWith('DEMO-') ? issue.fields.issuelinks[0].inwardIssue.key : ''
Sample issue JSON
{
"expand" : "editmeta,renderedFields,transitions,changelog,operations,worklog",
"fields" : { "aggregateprogress" : { "percent" : 100,
"progress" : 7200,
"total" : 7200
},
"aggregatetimeestimate" : 0,
"aggregatetimeoriginalestimate" : null,
"aggregatetimespent" : 7200,
"assignee" : { "active" : true,
"avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
"48x48" : "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
},
"displayName" : "admin",
"emailAddress" : "admin@example.com",
"name" : "admin",
"self" : "http://localhost:2990/jira/rest/api/2/user?username=admin"
},
"components" : [ ],
"created" : "2013-02-27T18:02:37.000+0100",
"description" : null,
"duedate" : null,
"environment" : null,
"fixVersions" : [ ],
"issuelinks" : [ ],
"issuetype" : { "description" : "A problem which impairs or prevents the functions of the product.",
"iconUrl" : "http://localhost:2990/jira/images/icons/bug.gif",
"id" : "1",
"name" : "Bug",
"self" : "http://localhost:2990/jira/rest/api/2/issuetype/1",
"subtask" : false
},
"labels" : [ ],
"priority" : { "iconUrl" : "http://localhost:2990/jira/images/icons/priority_major.gif",
"id" : "3",
"name" : "Major",
"self" : "http://localhost:2990/jira/rest/api/2/priority/3"
},
"progress" : { "percent" : 100,
"progress" : 7200,
"total" : 7200
},
"project" : { "avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/projectavatar?size=small&pid=10000&avatarId=10011",
"48x48" : "http://localhost:2990/jira/secure/projectavatar?pid=10000&avatarId=10011"
},
"id" : "10000",
"key" : "TIME",
"name" : "Timeship",
"self" : "http://localhost:2990/jira/rest/api/2/project/TIME"
},
"reporter" : { "active" : true,
"avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
"48x48" : "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
},
"displayName" : "admin",
"emailAddress" : "admin@example.com",
"name" : "admin",
"self" : "http://localhost:2990/jira/rest/api/2/user?username=admin"
},
"resolution" : null,
"resolutiondate" : null,
"status" : { "description" : "The issue is open and ready for the assignee to start work on it.",
"iconUrl" : "http://localhost:2990/jira/images/icons/status_open.gif",
"id" : "1",
"name" : "Open",
"self" : "http://localhost:2990/jira/rest/api/2/status/1"
},
"subtasks" : [ ],
"summary" : "Mega problem",
"timeestimate" : 0,
"timeoriginalestimate" : null,
"timespent" : 7200,
"updated" : "2013-03-27T18:03:48.000+0100",
"versions" : [ ],
"votes" : { "hasVoted" : false,
"self" : "http://localhost:2990/jira/rest/api/2/issue/TIME-4/votes",
"votes" : 0
},
"watches" : { "isWatching" : false,
"self" : "http://localhost:2990/jira/rest/api/2/issue/TIME-4/watchers",
"watchCount" : 0
},
"workratio" : -1,
"rate": 30
},
"id" : "10003",
"key" : "TIME-4",
"self" : "http://localhost:2990/jira/rest/api/2/issue/10003",
"worklog" : { "maxResults" : 2,
"startAt" : 0,
"total" : 2,
"worklogs" : [ { "author" : { "active" : true,
"avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
"48x48" : "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
},
"displayName" : "admin",
"emailAddress" : "admin@example.com",
"name" : "admin",
"self" : "http://localhost:2990/jira/rest/api/2/user?username=admin"
},
"comment" : "test",
"created" : "2013-12-05T00:00:00.000+0100",
"id" : "10000",
"self" : "http://localhost:2990/jira/rest/api/2/issue/10003/worklog/10000",
"started" : "2014-02-24T18:03:48.589+0100",
"timeSpent" : "1h",
"timeSpentSeconds" : 3600,
"updateAuthor" : { "active" : true,
"avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
"48x48" : "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
},
"displayName" : "admin",
"emailAddress" : "admin@example.com",
"name" : "admin",
"self" : "http://localhost:2990/jira/rest/api/2/user?username=admin"
},
"updated" : "2013-02-27T18:03:48.589+0100"
},
{ "author" : { "active" : true,
"avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
"48x48" : "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
},
"displayName" : "admin",
"emailAddress" : "admin@example.com",
"name" : "admin",
"self" : "http://localhost:2990/jira/rest/api/2/user?username=admin"
},
"comment" : "test",
"created" : "2013-02-25T00:00:00.000+0100",
"id" : "10001",
"self" : "http://localhost:2990/jira/rest/api/2/issue/10003/worklog/10001",
"started" : "2014-02-25T18:03:48.762+0100",
"timeSpent" : "1h",
"timeSpentSeconds" : 3600,
"updateAuthor" : { "active" : true,
"avatarUrls" : { "16x16" : "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
"48x48" : "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
},
"displayName" : "admin",
"emailAddress" : "admin@example.com",
"name" : "admin",
"self" : "http://localhost:2990/jira/rest/api/2/user?username=admin"
},
"updated" : "2013-02-27T18:03:48.762+0100"
}
]
}
}
Updated