kpiwko / jira-miner

A tool to gather data from JIRA and run extended queries on top of it
Apache License 2.0
12 stars 7 forks source link

jira-miner gives error when processing JBQA, but continues to work #2

Closed rsvoboda closed 7 years ago

rsvoboda commented 7 years ago

jira-miner gives error when processing JBQA, but continues to work. Seems that almost all issues are loaded, starting with JBQA-1 and ending with latest ones.

jira-miner populate "project in ('JBQA')"
Deprecation warning: value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Nobody, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:318:94)
    at configFromString (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2080:15)
    at configFromInput (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2444:9)
    at prepareConfig (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2427:9)
    at createFromConfig (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2394:40)
    at createLocalOrUTC (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2481:12)
    at createLocal (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2485:12)
    at Function.createInZone [as parseZone] (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:3752:24)
    at extractValueFromString (/usr/lib/node_modules/jira-miner/lib/jira/normalizer.js:115:33)
    at fieldChanges.map.change (/usr/lib/node_modules/jira-miner/lib/jira/history.js:88:13)
    at Array.map (native)
    at historySerie (/usr/lib/node_modules/jira-miner/lib/jira/history.js:84:30)
    at jiraFieldDefinitions.reduce (/usr/lib/node_modules/jira-miner/lib/jira/history.js:24:32)
    at Array.reduce (native)
    at addHistorySeries (/usr/lib/node_modules/jira-miner/lib/jira/history.js:23:24)
    at issues.forEach.issue (/usr/lib/node_modules/jira-miner/lib/jira/history.js:10:5)
Updated and stored collection default in /home/rsvoboda/.jira-minerdb
kpiwko commented 7 years ago

I wonder whether you are running the latest version. This issue is triggered by moment.js itself and I haven't found any way how to catch it - it is just a log from library.

That said, I would suspect that one of custom fields gets mapped in history to wrong field and this is causing this message.

@rsvoboda can you run with DEBUG=1 to get more details?

rsvoboda commented 7 years ago

I installed jira-miner week ago via npm install -g jira-miner

Running with DEBUG=1 now

rsvoboda commented 7 years ago
...
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"query":"project in ('JBQA')","msg":"Fetched 94% of results","time":"2017-02-02T16:30:50.171Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"query":"project in ('JBQA')","msg":"Fetched 95% of results","time":"2017-02-02T16:30:50.270Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"query":"project in ('JBQA')","msg":"Fetched 97% of results","time":"2017-02-02T16:30:50.401Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"query":"project in ('JBQA')","msg":"Fetched 98% of results","time":"2017-02-02T16:30:50.491Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"query":"project in ('JBQA')","msg":"Fetched 100% of results","time":"2017-02-02T16:30:50.801Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"Querying jira for custom fields in order to remap them in issues","time":"2017-02-02T16:30:50.841Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"Going to normalize field names for 13003 issues","time":"2017-02-02T16:30:51.871Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"All issues 13003 have now their fields altered","time":"2017-02-02T16:30:55.444Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"Attaching history to 13003 issues","time":"2017-02-02T16:30:55.444Z","v":0}
Deprecation warning: value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Nobody, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:318:94)
    at configFromString (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2080:15)
    at configFromInput (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2444:9)
    at prepareConfig (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2427:9)
    at createFromConfig (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2394:40)
    at createLocalOrUTC (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2481:12)
    at createLocal (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:2485:12)
    at Function.createInZone [as parseZone] (/usr/lib/node_modules/jira-miner/node_modules/moment/moment.js:3752:24)
    at extractValueFromString (/usr/lib/node_modules/jira-miner/lib/jira/normalizer.js:115:33)
    at fieldChanges.map.change (/usr/lib/node_modules/jira-miner/lib/jira/history.js:88:13)
    at Array.map (native)
    at historySerie (/usr/lib/node_modules/jira-miner/lib/jira/history.js:84:30)
    at jiraFieldDefinitions.reduce (/usr/lib/node_modules/jira-miner/lib/jira/history.js:24:32)
    at Array.reduce (native)
    at addHistorySeries (/usr/lib/node_modules/jira-miner/lib/jira/history.js:23:24)
    at issues.forEach.issue (/usr/lib/node_modules/jira-miner/lib/jira/history.js:10:5)
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"History has been attached to 13003 issues","time":"2017-02-02T16:31:26.997Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"Going to drop 13003 entries from collection default as they have been updated","time":"2017-02-02T16:31:27.003Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"Inserting 13003 entries into collection default","time":"2017-02-02T16:31:46.672Z","v":0}
{"name":"jira-miner","hostname":"rs","pid":29148,"level":10,"msg":"Collection default now contains 26389 entries","time":"2017-02-02T16:31:47.288Z","v":0}
Updated and stored collection default in /home/rsvoboda/.jira-minerdb

Is it sufficient info ? I'm on Fedora 25 with latest updates

kpiwko commented 7 years ago

Caused by NEEDINFO field history mapped to NEEDINFO Due Date and attempt to convert invalid value to date there.