Search the Community

Showing results for tags 'javascript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Company news
    • General announcements
  • ftrack Studio (main app)
    • General discussion
    • Feature requests
    • API
    • Help
    • Actions and Widgets
    • ftrack Go
  • ftrack Review
    • General discussion
    • Feature requests
    • Help
  • Connect and plugins
    • General discussion
    • Connect package releases
    • Feature requests
    • Help
    • Connect plugins releases
  • Advisory Forum
  • Tech preview
    • API
    • New integrations
    • Studio overview
    • ftrack Review

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 10 results

  1. It's my understanding that using the following code should always return the same metadata entity: const metadata = await session.ensure( 'Metadata', {parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", key: "builds", parent_type: "Breakdown"} ); If the entity did not exist before, `session.ensure` would create it, and if it did exist it would simply return the existing entity. Instead, if the entity already exists this will throw a Duplicate Entry error.
  2. If I do something like this: const metadataResult = await session.create( 'Metadata', {parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", key: "builds", parent_type: "Breakdown", value: "foo"} ); ...the contents of `metadataResult` will be: { action: "create", data: { __entity_type__: "Metadata", key: "builds", parent_id: "7bd2c20a-f7a1-11ea-8466-005056829324", parent_type: "Milestone", value: "foo" } } Notice how the `parent_type` key is listed as `Milestone` when it should be `Breakdown`. For further context, `Breakdown` is a custom object created via the Objects interface and it has the 'Status' box checked.
  3. Recently I was attempting to create a Folder object via the JavaScript API and encountered this error: Permission denied: not allowed to 'create' 'Task'. Missing the required 'Create objects (sequence,shot,task)' permission. I was providing the `name`, `parent_id`, `object_type_id` during my attempt, and the given error was very strange to me because my user should have administrator permissions for the project I was modifying. After a while I realized that I needed to also provide the `project_id` so that the API could figure out whether I had the appropriate permissions to make this change. Still, if the `project_id` is required to determine permissions, it would have been more useful if the error message specifically called that out instead of sending me down a rabbit hole of checking my permissions and API keys.
  4. Hello, One of our producers pointed out an issue in the task view for bid days. The summary in the top row is correct, but the sequence or shot rows will display 0.00 until the a shot has been expanded. It is easy to identify these potentially inaccurate sequences by looking at the status column. After the bid days data is loaded it can be flushed by clicking "Refresh spreadsheet manually". I was hoping to use the "Expand all" option as a work-around, but that raises an error: "Cannot expand all rows. Please filter or expand manually". Is this a known bug? Is there a way to load all data on demand? I would suggest not displaying anything if the data is not loaded rather than 0.00, as it can be misleading and add confusion to large projects. I've attached some screenshots of this phenomenon. ftrack version: 4.3.5.111 Thanks, Jesse
  5. Hello I attempted to use `<DroppableArea session={session} />` in ftrack-spark-base/example/Component and got ``` MESSAGE: Uncaught TypeError: Cannot read property 'isRequired' of undefined LINE: 246 IN: webpack-internal:///./node_modules/ftrack-spark-components/lib/droppable_area/component.js LEVEL: ERROR ``` Am I missed any initialization step? Missed parameter is React's intl. Also I expected git hub issue reporting workflow but didn't found something similar on bitbucket, is it correct place to report issues?
  6. Hi, Im kinda new to this so please bear with my newbie questions... Apparently it's good practice to close a session after you're done, but session.close() throws an error that the function doesn't exist and session.closed returns undefined.
  7. Hey there, we are currently trying to send custom events via the javascript api (as the title might let you guess... ) In a Node-style js-file we're testing the following code, which is sadly not working... var EventSender = function(server, user, key) { require('isomorphic-fetch') var ftrack = require('ftrack-javascript-api'); this.session = new ftrack.Session(server, user, key); if (this.session==null) { console.log('Error creating session'); return; } this.DoStuff = function() { // TODO: find another way to solve this // make session available to all subfunctions by creating a 'locally scoped' variable // otherwise 'this.session' is only available at the outermost usage (i.e. only on line 28) // the nested functions below line 28 don't know about 'this.session' var session = this.session; if (session==null) { console.log('Error - No active Session'); return; } return session.initializing.then(function() { var event = new ftrack.Event('infected.custom-event', {foo: 'bar', xyz: true}); console.log('sending...'); return session.eventHub.publish(event); }).catch(error => {console.log(error);}); } } sender = new EventSender('http://192.168.5.14', 'Admin', 'f22192fc-0cb6-11e8-b2cb-7ab7a47c9dda'); sender.DoStuff(); The resulting error-msg is: TypeError: Cannot read property 'socket' of null at EventHub._runWhenConnected (C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:307:32) at C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:224:23 at new Promise (<anonymous>) at EventHub.publish (C:\dev\javascript\ftrack.OS.management\node_modules\ftrack-javascript-api\lib\event_hub.js:223:31) at C:\dev\javascript\ftrack.OS.management\sendEventTest.js:30:28 at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) So for some reason, the local property '_socketIo' in event_hub.js is still null inside the method '_runWhenConnected', which is called in 'publish()' on line 224. Can you tell me why that is the case? having the same setup, we already successfully created calendar-events and other objects. Side-Question: Is it possible to send a custom event via javascript-api and receive it via the python-api? Thanks in advance Tim
  8. Hey there, as part of our integrations, we want to be able to setup entries in the 'overview calendar' for 'projects and users'. for example 'Add Leave' should be available. Ideally this should be done via external api-calls in javascript. by executing this: console.info(Object.keys(session.schemas)); for (schema in session.schemas) { console.info(session.schemas[schema]); } We found out, that there is something called: 'CalendarEvent'. Are we on the right track, playing with this? Since we don't know, how to deal with this, we shoot in every direction.. Is it possible to 'Add Leave' for a user via the javascript api? If yes, how is it done? We tried this: var query = 'select id from CalendarEvent'; But the result is: '(node:7332) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: request is not defined' Any help/assistance/ideas are greatly appreciated! thanks in advance Tim
  9. Hey everyone, as part of our integration process we would like to be able to make api calls "from outside". Since we need to create a session for this, we noticed a difference between python and javascript api. On python side it is possible to create a session object without giving any parameters, if the corresponding environment-variables are set correctly. In javascript this seems to be not allowed! export class Session { /** * Construct Session instance with API credentials. * * @param {string} serverUrl - ftrack server URL * @param {string} apiUser - ftrack username for API user. * @param {string} apiKey - User API Key * @param {Object} options - options * @param {Boolean} [options.autoConnectEventHub=false] - Automatically connect to event hub, * @param {Array|null} [options.serverInformationValues=null] - List of server information values to retrieve. * @param {Object} [options.eventHubOptions={}] - Options to configure event hub with. * * @constructs Session */ constructor( serverUrl, apiUser, apiKey, { autoConnectEventHub = false, serverInformationValues = null, eventHubOptions = {}, clientToken = null, } = {} ) { if (!serverUrl || !apiUser || !apiKey) { throw new Error( 'Invalid arguments, please construct Session with ' + '*serverUrl*, *apiUser* and *apiKey*.' ); } . . . Why do we have the option to create api-keys without giving it an api-user (on "ftrack-web-ui/system-preferences/API keys") when we cannot use them with the javascript api? How are we supposed to achieve external api-calls? thanks in advance Tim
  10. Hey there, we're currently trying to create a widget, that will list up some of our custom attributes, but for now its a struggle to get these. Maybe we just didn't look in the right place? With the python api its possible to get these values via the project: project['custom_attributes'] but with the javascript api, project don't seem to have these properties: console.info('all project properties: '); for(var key in currentProject) { console.info('project['+key+'] = ' + currentProject[key]); } gives us something like this: all project properties: index.js:62 project[context_type] = show index.js:62 project[__entity_type__] = Project index.js:62 project[id] = 19e2f1e4-01dd-11e8-ac42-7ab7a47c9dda index.js:62 project[name] = tims_test_321345 So if we cannot get the 'custom_attributes' via the project, where do we get them from? thanks an advance Tim