Git Product home page Git Product logo

platform's Introduction

Integrating with Harvest

Harvest Button Harvest Widget
Screenshot of the Harvest Button in action Screenshot of the Harvest Widget in action
The Harvest Button is a script that runs within your application to provide a clock icon that, when clicked, shows a modal dialog with a form to track time in Harvest. Get started! The Harvest Widget is a frame that is loaded by your application that contains a form to track time in Harvest. Get started!

User Authentication

There is no additional configuration within your application for selecting a Harvest account or user. The user’s browser session is used to find what Harvest user is currently logged in β€” or, if no Harvest users are logged in, a login form is presented instead of the time tracking form when it is displayed.

Harvest Project and Task Suggestion

Harvest will take the information you provide about the item the user is tracking time against to suggest a Harvest Project and Task that we think the user is most likely to use. You cannot set the Harvest Project and Task shown by default explicitly.

The Harvest Project and Task suggested is based on what time has already been tracked to this item in your application. If no time has been tracked to this item yet, then the suggestion is based off the group that the item is a part of in your application. If the group also has no time tracked, a Harvest Project that was created from the time tracking form will be considered.

Browser Support

Both the Harvest Button and the Harvest Widget support the same browsers that Harvest supports.

platform's People

Contributors

adunkman avatar braddunbar avatar dannyw avatar evanwalsh avatar michellea1 avatar pusewicz avatar sherryumlah avatar tjschuck avatar weylandswart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

platform's Issues

Have to clear cache and reload page to make timers visible

I have a tampermonkey script I have written for Chrome. In order for the timers to show, I have to clear my browser cache and reload my page. Every time.

Any idea why this would be happening or how I can prevent it?

There are no console errors and I have a button to loadTimers that manually calls the timers:add function, and it's triggering, but still no graphic.

Can it automatically select LAST used "Task name"?

When I submit time from Harvest, it automatically detects last used Harvest Project, which is connected with my Redmine project.

But - is it possible to automatically select Task Name, last used?
Or better - specify task ID or NAME in Json?

Select a default project

Hi,

I'm trying to integrate the harvest button in our issue tracker. I want to be able to setup the selected project when the button is clicked, so the default project could be the one the actual displayed issue belong to.
Unfortunately the is no "project" parameter in the data-item section. So i'm trying to do it with jQuery, do you think it is possible to change the default value of the select menu of the project field when the popup is showed ? Cause the select menu is hidden by default,..

Thanks

Const identifier reassignment bug

We are pulling a platform.js script from the CDN provided in your readme but it stopped working very recently (within last 24 hours). The issue seems to be a const reassignment in the addTimers function. For now, I have resolved this by patching the raw js file and changing const o to let o

I am attaching images for your reference

Console error:
Screenshot 2024-01-12 at 10 02 40 AM

Before patch:
Screenshot 2024-01-12 at 2 10 38 PM

After patch:
Screenshot 2024-01-12 at 2 10 29 PM

Please do let me know if this is expected behaviour or a bug and if it is expected, let me know how I can resolve it without patching the script

`SyntaxError: The string did not match the expected pattern.`

Seeing errors with message : SyntaxError: The string did not match the expected pattern. in Safari.

Screenshot 2024-01-02 at 10 43 19

Sorry for the screenshot and not providing a text version of the stacktrace. Safari doesn't make it possible to copy/paste stacktraces as text.


The error happens in

  if (accessToken && accountId) {
    postCredentialsToChromeExtension(accessToken, accountId)
  }

Which seems logical because Safari won't have any chrome extensions πŸ˜…

Blank error message returned if you sign out from the account switcher and try to start a timer

Description

When you sign out from the account switching subwindow, the widget doesn't update to show that you're signed out. That means that you're still able to click Start Timer. When you do so, an error box appears without any text. It looks like this:

Screen Shot 2020-01-30 at 8 42 49 AM

Steps to reproduce

  1. Open a platform widget and make sure you're signed in.
  2. Click Switch Account.
  3. Instead of selecting an account, click Sign Out at the bottom.
  4. Go back to the widget and click Start Timer.

Expected result

Either signing out would update the widget to show the You need to sign in! page again, or at an error would be displayed that says I'm not signed in.

Incorrect time calculation, if SAVE ENTRY clicked before focus-out from "to" field

Harvest is working hard, to create really cool user interface, work working not only with mouse, but a keyboard too. But API has one tiny bug:

Scenario:

  • open new time report in API
  • enter in "from" field (e.g.2003) time, then go to next input field by keyboard TAB ("field "to" time will be converted automatically to decimal or time format "20:03")
  • enter in "to" field time (e.g. 2100), and (this is important!) - press ENTER.

image

Time will be added as hours, left till midnight.
In my examle:

image

Getting data back after entry created

It would be create if the widget would pass data back to the original app when the timer was stopped or entry created.
Something similar to the harvest-event:ready would be terrific. This would allow us to show the values on our side.

How do we get our app icon to appear in Harvest?

We've been able to successfully integrate into our app, but the external project link doesn't show our app icon. We're assuming this is pulling the page favicon as the source. Is there something we are missing?

IE 11 .initCustomEvent bug

IE 11 complains, when importing your code via <script async src="https://platform.harvestapp.com/assets/platform.js"></script> to setup the harvest button.

Following screenshot shows the error, which is thrown by IE:
argument-not-optional

The .initCustomEvent() seems to be the problem. Simply adding an empty object as 4th parameter, solved the issue. So you would have .initCustomEvent("harvest-event:ready", !0, !0, {})

Harvest Button: Getting "401 Unauthorized" responses

The Harvest button script is returning 401 unauthorized as the response for the request for "https://platform.harvestapp.com/platform/running_timer.json". The response body says, "You must be authenticated with Harvest to complete this request." As a result, the buttons just don't work. Clicking on them does nothing. I would expect clicking on them to bring up a log-in modal. This is causing significant productivity interference in my app where non-logged in users cannot easily log in by clicking the button, and the app just feels broken because nothing happens.

Preset the selected task in widget?

Is there anything like the default_project_code/name variable but for the actual task? We're trying to integrate this into our ticketing system and the tickets come across with the task they fall under so we want to set the task to default to the tickets task.

Is there anyway to do this currently?

How to add an icon for a service?

I'm developing an integration with Todoist.

Currently, no icon is shown on the team member page and a generic "link" icon is shown on the timer widget of the Chrome extension.

Is there a way to specify the icon for the service where the permalink is located? If it's done on your end and you are willing to add an icon for this, I'm using the applicationName "Todoist".

Ability to "set date" in time report window

Hi!

Will it be available in the future, to set Date in time report?
E.g. - today, if I want to report time about Yesterday, I need to report time and then open it in Edit mode in Harvest online, and then change date.

Widget currently broken

Hi there,

We had a working widget embedded in our internal site but its currently not working. I've contacted Harvest support but not heard anything back from them. Let me know if you need more info.

atrium_update___comments_in_tracker___agile_support

"Total time logged" disappeared

Hi!

From pop-up timer window disappeared "Total Time Logged" for issue.
Previously it was visible somewhere around this red block:

image

Button project_code does not return a project

I'm adding in the project code, taken from the value of the select menu project and this isn't returning a default item.
<option value="14615508">(Content) Meeting: 1-1</option>

<div class="harvest-timer" data-default='{"project_code":"14615508"}'></div>

"Deleted" task names still appears in api interface

If You "delete" any task name from Harvestapp project settings, but this Task name has alreaddy assigned time entries, then in Harvestapp project settings it will show up as:

image

And will not be available for new task entries in Harvestapp.

But - in platform api - it will still be available to choose "deleted" tasks from dropdown

image

Application icon

Apart from #5, where you offered to manually set the application icon, I couldn't find any resource explaining how to get the favicon there automatically (if this is possible at all).

I'm asking because I'm developing a time tracking plugin for JIRA (I know that there are already :) ) which could be deployed to different addresses and setting up the icon manually each time seems cumbersome.

Is there such a resources somewhere? I tried with different combinations of favicon formats and markup, but without success.

Existing group id is not recognized / preselected

If I pass:
{"id":"12","name":"Project Name"}
(Where "12" and "Project Name" are available in my harvest account)

and the group (Project) already exist in my account, it should be a pre-selected entry.

Currently the button opens the window and suggests me adding new entry under the same name.
I consider this a bug because this doesn't allow integrations on already-existing setups and render that button unusable.

Widget keeps grabbing focus

I've implemented the widget on a Drupal site we use as a ticket tracking system for customer support. I've noticed that when the timer is running the 'Stop timer' button gets focused when the timer increments. This is really irritating if you're reading something elsewhere on the page, or worse when you're writing something in a field and suddenly the field loses focus and you jump down to the widget.

I've only tested this on Safari 9.0.3 so far, I can take a look at Chrome and see if its happening there too. Is this something you're aware of?

[FR] Specify client together with project_name

Hi,
I am wondering if it would be possible to specify both client_name and project_name for the button?

We have Shared project names for all our customers, example:

Client X: Consultancy
Client Y: Consultancy

Consultancy is the Project name.

I would like to be able to pre select the correct client and project name in my button so it is would be easy to report time on each client.

Brg
Robin

"running" class not applied to button upon registration

If a registered button is clicked and the timer is started, the "running" class is applied by harvest's JS. However if you come back to that button (either after a page load, or dynamic UI change and the button is recreated, and registered) the button doesn't get the "running" class applied to it.

Is this a bug? It seems counter to the usefulness of the button!

Is there any way for us to manually determine the state of a timer and apply a running class ourselves?

Harvest widget , how to show active timer?

After refreshing, the Harvest widget is not displaying the active timer. The data remains the same, and it only offers me the option to create a new timer.

The timer is running in the background, but it's not being displayed by the widget.

Referral for the "Please Sign-In" dialog

The Harvest Platform is well done and really easy to use. Great work!

We have just released an integration with GitHub:
http://blog.klokantech.com/2012/12/github-time-tracking-and-invoicing.html

If the people are not logged into Harvest you display the "Please Sign-In" dialog which has on the bottom a sentence "If you don't have an account yet, try Harvest free now." with link to:
http://www.getharvest.com/signup?utm_source=WebPlatform

Would it be possible to include the "referral" key as an option in the _harvestPlatformConfig and use it in this link?

So for the 'referral':'66lx' the link would become:
http://www.getharvest.com/signup?invitation=66lx

Thanks!

Widget focus problem

It looks like you closed #44 suggesting that it had to do with it being a 3rd party extension, it also looks like you don't seem to be responding to comments on closed issues, I am making a new post here.

From the @andyg5000 who initially opened the issue:

The Harvest widget will periodically shift the focus in the browser to the "Stop timer" button automatically on the page. When you're typing a comment and it shifts the focus, it caused the timer to be stopped.

@adunkman I don't think you understand what @andyg5000 is saying, this is not support for a 3rd party extension, this is a problem with the fact that your iframe widget steals the focus after an amount of time so that it actually interrupts a users workflow. It happens exactly when the timer shows that 1 minute has past.

I have made a very minimal HTML/iframe setup and a screen cast in order for you to understand the issue, please note that there is no extension involved with this.

harvest-widget-focus-issue

min-harvest-timer.html.txt
(note that I had to make the file .txt in order to upload)

Using Harvest iframe on webview for native mobile applications

I am currently using the Harvest iframe plugin on our web app and it works great.

I recently created a hybrid native mobile app where the responsive web app displays through the native application. I can get the iframe working and the "Sign In" to kick off to Harvest, but when the Harvest platform redirects to within the mobile app, it does not refresh with the timesheet.

Is there a workaround for this? Does Harvest disallow the iframe plugin to work on certain browsers?

Unminified / Deobfuscated Version of Platform JS

Would it be possible to get an unminified / deobfuscated version of the platform.js file? Google will not accept a Chrome extension referencing the current platform.js file into the webstore.

"End Time" automatically converted to "current time", if character entered, but timer not stopped

In harvestapp.com online, if I set Start time in history and input dot (.) symbol in End Time field, with saving Harvest will automatically convert End Time value to Current Time value and stop timer.

So, it is easy to save last spent time without entering exact current time value.

Now in platform - it does not stop timer.
I liked previous functionality. Will it be fixed, or I can enter "End Time" value differently?

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.