(web) IXVD live feed on current issues/maintenance. #7

Closed
opened 2023-09-26 14:25:19 +02:00 by strix · 6 comments
Owner

The IXVD site already has this feature but we need to make this a better experience.

(this issue is also meant to test the featue ;))

The IXVD site already has this feature but we need to make this a better experience. (this issue is also meant to test the featue ;))
strix added the
Kind/Enhancement
Priority
Low
labels 2023-09-26 14:25:31 +02:00
strix started working 2023-09-26 14:25:32 +02:00
strix stopped working 2023-09-26 14:26:55 +02:00
1 minute 23 seconds
Author
Owner

I've now added a status indicator directly tied to the time tracker as I frequently use it for maintenance issues.
When a tracking has begun it will say: "in progress" in the status and "not being worked on" when time tracking is stopped.

This feature has a flaw because it does not keep in mind that multiple people can work on one issue.
Therefore if doggo starts working together with catto and doggo stops working while catto is still working, it will say "not being worked on".

example:

doggo: start
catto: start
doggo: stop

this will likely be fixed with a "indent count" type of fix.

I've now added a status indicator directly tied to the time tracker as I frequently use it for maintenance issues. When a tracking has begun it will say: "in progress" in the status and "not being worked on" when time tracking is stopped. This feature has a flaw because it does not keep in mind that multiple people can work on one issue. Therefore if doggo starts working together with catto and doggo stops working while catto is still working, it will say "not being worked on". example: ``` doggo: start catto: start doggo: stop ``` this will likely be fixed with a "indent count" type of fix.
strix started working 2023-09-26 14:30:41 +02:00
Author
Owner

fixed with this code:

    let time_trackers = -1;
    json.forEach((entry) => {
        switch (entry.type) {
            case 'start_tracking':
                if (time_trackers === -1) time_trackers = 0;
                time_trackers++;
                break;
            case 'stop_tracking':
                time_trackers--;
                break;
        }
    });

    if (time_trackers > 0) {
        status = "in progress"
    } else if (time_trackers === -1) {
        status = "not tracked"
    } else {
        status = "work is suspended"
    }

    return status;
fixed with this code: ```js let time_trackers = -1; json.forEach((entry) => { switch (entry.type) { case 'start_tracking': if (time_trackers === -1) time_trackers = 0; time_trackers++; break; case 'stop_tracking': time_trackers--; break; } }); if (time_trackers > 0) { status = "in progress" } else if (time_trackers === -1) { status = "not tracked" } else { status = "work is suspended" } return status; ```
Author
Owner

Alright leaving it as is, this is probably a good fix.

Alright leaving it as is, this is probably a good fix.
Author
Owner

Committed and pushed, bumping submodules in neong...

Committed and pushed, bumping submodules in neong...
Author
Owner

Bumped submodules and pushed.

Bumped submodules and pushed.
Author
Owner

lgtm. closing issue...

lgtm. closing issue...
strix closed this issue 2023-09-26 14:38:19 +02:00
strix stopped working 2023-09-26 14:38:19 +02:00
7 minutes 38 seconds
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 9 minutes 1 second
strix
9 minutes 1 second
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ixvd/hub#7
No description provided.