pbauerochse / youtrack-worklog-viewer

A tool to keep track of the work hours you spent on issues in the YouTrack issue management system
MIT License
39 stars 10 forks source link

Icon representing the state of a task #11

Closed bjoern-mahler closed 8 years ago

bjoern-mahler commented 9 years ago

Would be great if you could see the state of a certain task, whether a task is already resolved and maybe when (on which day) by displaying a greenish check icon or something like that. Many customers wants to know if a task is finished or not on their invoice so they can see, if they have to spend more money on it for next month(s) - so exporting this state (resolved/unresolved) would also be great.

bjoern-mahler commented 9 years ago

Great news 😊 .. Boring at home?

pbauerochse commented 9 years ago

Nah, I just needed my daily dose of programming that day ;)

bjoern-mahler commented 9 years ago

Neither me nor marc sees any state-icon... the column is there, but nothing else...

pbauerochse commented 9 years ago

There actually is no icon representing each state individually. I can only access the state in terms of "isResolved" or "isNotResolved" (see comment at https://github.com/pbauerochse/youtrack-worklog-viewer/blob/master/src/main/java/de/pbauerochse/worklogviewer/youtrack/connector/YouTrackConnectorBase.java#L227 for an example response I get from YouTrack requesting the task details). In case of resolved you should see a green tick indicating that the task is done. If you hover above it with your mouse, it should show a tooltip telling you on which date it was marked as resolved.

Btw: you can see the response the worklog viewer receives in the log messages window. "Received JSON response <YouTrack Json response here>".

If it helps you I can add another icon for the unresolved state so the column will never be empty.

Let me know.

Cheers and say hi to everyone...especially to the Bengel!

Patrick

bjoern-mahler commented 9 years ago

Yeah - expected it this way, but there is really no icon at all. Maybe I use this issue as a chance and debug through it ;) - I first thougt it could be a macos-only thing... but the bengel didn't see it either...

greetings from him and the rest

Björn

pbauerochse commented 8 years ago

Hey Björn,

can you check again with the new 2.2.1 version? I actually did not change anything in the handling of the icon but I added some more logging. It should tell you now, that it is trying to display an icon. While you are at it: can you please hover above the cell where an icon was expected to show up and see if it is at least showing the tooltip? resolved-icon

Cheers

Patrick

bjoern-mahler commented 8 years ago

Hey,

I checked again - same thing and it doesn't show the tooltip - but - now I see exactly one (!) icon representing the correct state (resolved) while all other tasks which are also resolved didn't show any icon...

a snippet of my json result showing that more then one task is resolved:

{
            "id": "xxx-1",
            "entityId": "81-194",
            "jiraId": null,
            "field": [
                {
                    "name": "resolved",
                    "value": "1447334474956"
                }
            ],
            "comment": [],
            "tag": []
        },
        {
            "id": "xxx-2",
            "entityId": "81-195",
            "jiraId": null,
            "field": [
                {
                    "name": "resolved",
                    "value": "1447841560432"
                }
            ],
            "comment": [],
            "tag": []
        }

In the logs I see this npe on startup:

java.lang.NullPointerException: null
    at de.pbauerochse.worklogviewer.youtrack.createreport.request.CreateReportRequestEntity.<init>(CreateReportRequestEntity.java:30) ~[youtrack-worklog-viewer-2.2.1%20(1).jar:na]
    at de.pbauerochse.worklogviewer.fx.tasks.FetchTimereportTask.call(FetchTimereportTask.java:45) ~[youtrack-worklog-viewer-2.2.1%20(1).jar:na]
    at de.pbauerochse.worklogviewer.fx.tasks.FetchTimereportTask.call(FetchTimereportTask.java:23) ~[youtrack-worklog-viewer-2.2.1%20(1).jar:na]
    at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) ~[jfxrt.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_45]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_45]

I also tried some things with the original tasks in youtrack, looking for differences but actually didn't found any...

hth and cheers Björn