Skip to content

Commit

Permalink
Merge pull request #17 from ljay79/develop
Browse files Browse the repository at this point in the history
merge branch develop into master
  • Loading branch information
ljay79 authored Jun 29, 2017
2 parents 93f38bb + e696a78 commit f90b285
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
3 changes: 2 additions & 1 deletion Code.gs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
* - add feature to insert list of tickets (issue overview) based on available Jira filters
*/

var LOGGING = false;
var BUILD = 0150;
var LOGGING = true;

/**
* Add a nice menu option for the users.
Expand Down
7 changes: 6 additions & 1 deletion IssueTable.gs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ function IssueTable(sheet, initRange, data) {
*/
this.addSummary = function(summary) {
range = sheet.getRange(initRange.getRow() + rowIndex++, initRange.getColumn(), 1, headers.length);
range.mergeAcross().setValue(summary);
//range.mergeAcross().setValue(summary);
range.clearContent()
.clearNote()
.clearFormat()
.getCell(1,1)
.setValue(summary);

return this;
};
Expand Down
2 changes: 1 addition & 1 deletion dialogAbout.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div class="block head">
<span class="icon"><img src="https://s3.eu-central-1.amazonaws.com/jira-tools/symbol.png" width="50" height="50" /></span>
<span class="title">Jira Sheet Tools v0.14.0</span>
<span class="title">Jira Sheet Tools v0.15.0</span>
</div>

<div class="block about">
Expand Down
1 change: 0 additions & 1 deletion dialogs.gs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ function insertIssuesFromFilter(jsonFormData) {
var data = {
jql: filter.jql,
fields: jsonFormData['columns'] || [],
properties : ['due'],
maxResults: 100,
validateQuery: 'strict'
};
Expand Down
17 changes: 11 additions & 6 deletions jiraCommon.gs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var ISSUE_COLUMNS = {
assignee: 'Assignee',
creator: 'Creator',
reporter: 'Reporter',
due: 'Due',
duedate: 'Due',
/* --- */
labels: 'Labels',
project: 'Project',
Expand Down Expand Up @@ -309,16 +309,21 @@ function unifyIssueAttrib(attrib, data) {
};
break;
case 'updated':
case 'created':
resp = {
value: data.fields.updated || 'n/a',
date: new Date(getDateFromIso(data.fields.updated)) || new Date(),
format: "dd.mm.yyyy"
value: data.fields[attrib] || 'n/a',
date: new Date(getDateFromIso(data.fields[attrib])) || new Date(),
format: "dd.mm.yyyy hh:mm"
};
break;
case 'duedate':
// very dirty - just cant get arround timezone issue when date is in format 'YYYY-MM-DD'
// @TODO: require proper generic solution for this
var _duedate = data.fields.duedate || 'n/a';
_duedate = (_duedate.length == 10) ? _duedate + 'T12:00:00' : _duedate;
resp = {
value: data.fields.duedate || 'n/a',
date: new Date(getDateFromIso(data.fields.duedate)) || new Date(),
value: _duedate,
date: new Date(getDateFromIso(_duedate)) || new Date(),
format: "dd.mm.yyyy"
};
break;
Expand Down
1 change: 0 additions & 1 deletion jsLib.gs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function camelize(str) {

/**
* @desc Converts ISO 8601 date string into JS date object
* http://delete.me.uk/2005/03/iso8601.html
* @param string {string}
* @return {Date}
*/
Expand Down
14 changes: 9 additions & 5 deletions storage.gs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var jiraColumnDefault = [
'status',
'updated',
'assignee',
'due',
'duedate',
'project'
];

Expand Down Expand Up @@ -98,12 +98,16 @@ function getVar(key) {
*
*/
function initDefaults() {
var build = getVar('BUILD') || 0;
var isInitialized = getVar('defaults_initialized') || 'false';
if (isInitialized == 'true') return;
if (isInitialized == 'true' && build == BUILD) return;

// set default jira issue columns
var columnDefaults = getVar('jiraColumnDefault');
columnDefaults = (columnDefaults != null) ? JSON.parse(columnDefaults) : jiraColumnDefault;
setVar('BUILD', BUILD);

// set default jira issue columns
//var columnDefaults = getVar('jiraColumnDefault');
//columnDefaults = (columnDefaults != null) ? JSON.parse(columnDefaults) : jiraColumnDefault;
columnDefaults = jiraColumnDefault; //@TODO: allow user to change default columns
setVar('jiraColumnDefault', JSON.stringify(columnDefaults));

// Jira onDemand or Server
Expand Down

0 comments on commit f90b285

Please sign in to comment.