YouTrack Lite How to automatically track time - youtrack

Is there anyway to track time with just Start/End Button with automatic adding to Spent time field?
Tried Clockify. It doesn't work at Lite version and even in Classical one it just track specific task inside Clockify app without transferring to YouTrack Spent Time Field.
Workflow called workTimer that starts a timer each time issue is moved to 'In progress' state is not an option as we don't use field State.

It is possible to use YouTrack's default Stopwatch-style work timer (https://www.jetbrains.com/help/youtrack/incloud/Workflow-Standalone-Work-Timer.html). It doesn't use the State field. Instead, it starts the timer when the corresponding Timer field is set to Start. After setting the Timer field to Stop, the timer stops and adjusts the Spent time field accordingly. You can attach the default workflow to your project; after that, the workflow will suggest you to add all required fields automatically.
Please note that work items are not displayed in YouTrack Lite at the moment. However, the nearest major YouTrack release will solve this, bringing time tracking for YouTrack Lite. So for now you can see only the total spent time value of each issue. To see the work items themselves, you'll need to switch to YouTrack Classic.

Related

Interval timer vs database field for over-the-air updates?

I want to provide OTA updates to users. My app uses real-time listeners on the database, so my question is whether to:
Set a 15 minute interval timer to check if an update is available (requires network call and long timers)
Database field for each user specifying when update is required (2X write calls per user)
Check when app is launched or foregrounded (latter may occur multiple times in a single session, would have to add a refractory period)
Some hybrid or other solution
... or perhaps I am worried too much about some best practice / optimized solution when the end user experience is not really affected by whichever option I choose?
My solution is basically an implementation of option 3. If a user is constantly switching in and out of the app, it will wait 15 minutes after the last update check to check again.
A useRef time variable that stores the last time the app was foregrounded
An update function that checks for updates
If available: fetch update and reload app
A useEffect to check for updates on launch
A useEffect to listen to changes in AppState
If app was foregrounded && time.current + 15000 < Date.now(): check for updates

How to do LAG like implementation in KSQLDB?

I've recently started working with ksql and wanted to check if someone can help me with a query design. The problem statement is that I have a video conferencing app where a broadcaster can start and pause the stream multiple times. I want to get the total played time and the total paused time for that stream. I have a click stream data which consists of start and pause timestamps. How should I go about it so that I can generate an optimized view.
Any help is very deeply appreciated :)
Thank You
Grouping events
The first problem you'll need to solve is how are you going to group start/stop events together?
Likely, you'll want to group them by some kind of USER_ID or other attribute that uniquely identifies the broadcaster that's starting/stopping the stream.
Likely, you'll also want to group by the some kind of STREAM_ID or other attribute that uniquely identifies the stream being played.
This may be sufficient, it you only want the total play time per-broadcaster, per-video. However, you may also want to take time into account. For example, if I watch a video today, and then watch it again tomorrow, is that two viewing sessions, with two independent view time totals, or do you not care?
One way of grouping events in time is using session windows. Before you sessionize the data you'd need to define the parameters that define your session. Here's a good example of using session windows in ksqlDB.
Another way of grouping events in time is using tumbling windows. Here's a good example of using tumbling windows.
Calculating play time
Once you've grouped your events, you'll likely need to calculate the play time. For example, if I start playing at time 5, and stop playing at time 8, then the amount of time I was watching the video is 5 - 8 = 3.
This requires capturing the play event and waiting for the stop event, and then outputting the difference in time. And doing some in a fault tolerant way.
At the time of writing, this would require a custom UDAF (custom user defined aggregate function).
A custom UDAF could capture the start event, store it for future reference, and output a '0' for the play time, and then when it sees the corresponding stop event it can remove the start event from its state, calculate the play time and return it.
Here's a good example of writing a custom UDF in ksqlDB, though you require a custom UDAF, which are covered here.
There is currently a PR open with an enhancement to the LATEST_BY_OFFSET method that may well serve your purpose. This enhances the method to allow it to capture the last N value, rather than just the last 1 value. Likely, this will be released in ksqlDB v0.13, and you can always pull the code and compile it locally, if you have any development experience. If it doesn't serve your purpose, then you may be able to use it as the starting point for developing your own.
Of course, these solutions requires your stream of source events to be correctly ordered, so that stop events never come before their associated play events.
Aggregating
Once you've calculated the play time between a pair of start/stop events, you'll then need to aggregate them. Here's a good example of how to aggregate in ksqlDB.

UWP background task location tracking

I'm trying to develop an UWP app that is able to continually track the user's location in an in-process background task. I've been looking at the Microsoft sample code on GitHub (geolocation / Secenario3_BackgroundTask) but the problem there is that it is based on a TimeTrigger. The shortest interval that TimeTrigger allows is 15 minutes, but I need to get location updates much more frequently. Let's say at least once per minute. Is that possible at all?
I've seen that there is a LocationTrigger but there's not much documentation for it. I don't understand when this trigger gets fired. In my tests, it never got fired.
LocationTrigger is used for Geofencing, it is triggered when a mobile device enters or leaves a particular area.
As you say, TimeTrigger is not good for your requirement because it has an interval of 15 minutes at the minimum.
Windows 10 introduces a new mechanism called extended execution. Location tracking is one of the supported scenarios in which you ask the OS to keep your app running when another app is switched to the foreground.
This is a sample for your.

NotesTimer causes the whole lotus client to flicker

I have a timer that talks to java objects through LS2J. It has only to call some getters of the java objects and to update the GUI with new values. This causes the GUI in iNotes Client to show the "Busy" cursor very shortly when the timer ticks. I is really annoying because it occurs even when another window is open and even in the designer.
I actually have to expect that the functionality in the timer event will get more complicated in the future, so I don't want to solve the problem by making my handler lighter.
Is there a way to tell iNotes client not to show this cursor or even an alternative way to make this regular check without timers?
The NotesTimer class in Notes client (not iNotes) does take over the foreground when it triggers, so there will be a bit of a delay if you do something that takes time to execute. It's possible to set up the Notes client to execute background scheduled agents in local database replicas, so that might be an option. You can to the heavy lifting in background and deposit the results somewhere -- say, in a profile document -- that can be accessed quickly by the UI code.
Alternately, you could try a XPages in the client application. I believe it can do partial refreshes while other stuff is going on.
For the record, I simplified the functionality of the Java call by preparing the data so that the timer only has to read the results. I also made the timer run every 3 seconds instead of 1.
Now I don't see any flicker!

Using Dday.ical How can I send multiple events with the same start time and duration

When I setup the event using DDay.ical I can successfully send the events to a user's outlook. The problem arises when multiple events are setup at the same time. When this happens all emails are updates to the original task, not new tasks.
I tried adding a name to the event using the .Name property, which results in the event email being an unsupported calendar invite.
Ended up figuring this out through some good old trial and error.
In the end I was not properly setting the UID property to be a completely unique identifier for each event. Changing this to be unique 100% of the time fixed the issue and allowed me to be able to create as many events as I want, any time I want, and have them all appear as separate events instead of updates.