Module : Script

Issue

Type

TrialGrid Version

Description

5859

Feature

93

Import Scripts can change existing draft records with UpdateDraftObject, including their custom properties, the Fields of a Form, the entries of a dictionary, and the logic, steps and actions of an Edit Check or Derivation.

5865

Feature

93

Import Scripts can now change a Project's settings and custom properties with UpdateProject. Changes to custom properties across many Projects are checked against your rules together, once per set of properties changed.

5675

Feature

93

Import Scripts can now create Edit Checks and Derivations, with their steps and actions, with the CreateDraftObject command.

5860

Feature

93

Document templates and scripts can list the team of a Project, showing who holds which Role in it.

5863

Feature

93

Document templates and scripts can tell whether a team member's account is active, so a report can name only the people who can sign in.

5567

Bug

93

On a Designer URL, CreateDraftObject no longer lets a script set Form attributes that apply only to Classic Rave. A blank value for an attribute a script cannot set now sets nothing, rather than stopping the command.

5671

Feature

93

Import Scripts can now create Fields in a Form with the CreateDraftObject command.

5673

Feature

93

Import scripts can now create Standard Rules in a library Draft with CreateDraftObject. A Standard Rule saved without an Identifier is no longer given one that another rule saved with it uses.

5546

Feature

93

Copies an Import Script makes one after another are now made together, up to 100 at a time, so a Folder and the Folder it sits in, or a Form and the Form it links to, are linked whichever of the two is copied first.

5781

Feature

93

Import Scripts and Document Templates can now list the tickets that refer to a Form, Edit Check, Test Case or other object.

5782

Feature

93

Import Scripts can now read the activity history of an object, and the activity of a URL or Organization limited to what you can view.

5758

Feature

93

An Import Script can keep what it finds as named tables and values, and a test run shows them on a tab of their own, which a script that only looked something up opens on. A filter on text that finds nothing now says why, naming a value that differs only in upper or lower case, or listing the values that are there. A custom property can be named in any case, and naming one that is not defined says which names are. Saving or running a script that adds to a dictionary entry with += now says how to write it out in full, and a URL lists the Projects you have permission to view.

5676

Feature

93

Import Scripts can now create Data Dictionaries, Unit Dictionaries and their entries with the CreateDraftObject command.

5730

Feature

93

Import Script runs can now issue up to 20,000 commands. Large runs are summarised by kind of command, and the full list can be downloaded as text or JSON. A test run's log has a tab of its own, which a run that failed opens on.

5683

Feature

93

Import Scripts can now create Matrices with the CreateDraftObject command, and set which Folders and Forms a Matrix holds with the new SetMatrixFolderForm command. A Matrix Name must now be unique within the Draft, as Rave requires, so a Matrix that shares its Name with another must be renamed before it can be saved. Saving the Matrices grid when a Folder or Form it names is no longer in the Draft now says which one, instead of failing.

5655

Feature

93

Import Scripts can now create Folders and Custom Functions with the CreateDraftObject command.

5670

Feature

93

Import Scripts and Document Templates can compare two objects, or an object with its Library Standard, and report the differences, rules and explanations.

5674

Feature

93

Import Scripts can now create Test Cases with the CreateDraftObject command. Auto Actions on a Test Case, and on Custom Functions copied with an Edit Check or Derivation, now see the record's custom property values.

5564

Bug

93

Import Scripts can now pass numbers and dates read from a JSON or YAML file to a command, and true or false to a true/false attribute. In a YAML file, values such as Yes, No and 0123 are now read as written rather than as true/false or a number.

5641

Bug

93

Import Scripts and Custom Diagnostics can now pass a list or dictionary as a function's arguments with * and **.

5263

Bug

93

Using @= in a custom diagnostic or Import Script now behaves as it does in Python, rather than silently dividing.

5634

Feature

93

Import Scripts can read JSON held as text with parse_json, so a script can work with the JSON in a Custom Property or a spreadsheet cell instead of picking at it with string methods. Where the text is not JSON it raises ValueError, which a script can catch to report the row that was wrong and carry on. NaN and Infinity are refused both by parse_json and in a JSON file given to a script, as are .nan and .inf in a YAML file.

5620

Bug

93

The help now lists every query method, filter and built-in function an Import Script or Document Template can use, each with a worked example. An attribute or query field that does not exist is reported with the names you probably meant, an Import Script can now format a date with strftime, and an Import Script can read the objects a ticket is about.

5626

Feature

93

Import Scripts can now write a Project's wiki. SetWikiPage writes the whole of a page, creating it if needed, AppendToWikiPage adds text to the end of a page, and EditWikiPage replaces text it finds exactly once, or everywhere when asked. AddWikiImage adds an image for pages to show, checked and re-encoded as an image pasted into the wiki is. Each change adds a version to the page's history, credited to the person who applied it.

5594

Feature

93

An Import Script can now copy any kind of record from another draft with one command, CopyDraftObject, which is told the kind and which record to copy. A form, a folder, an edit check, a derivation, a matrix, a data or unit dictionary, a custom function, a test case and a record of a type you defined can all be copied this way, and a standard rule can be copied into a library. A record that sits inside another, such as a field on a form, is copied by naming the record it belongs to, which has to be in the draft already. It replaces CopyForm, which has been removed, so a script which copied a form now asks for CopyDraftObject with type "Form".

5552

Feature

93

Import Scripts and Document Templates can now list the URLs of an Organization that the user has permission to view and the object types defined in a URL, and read the properties of an object type without needing an object of that type. An object type also gives the name it is known by in files that go in and out of TrialGrid, so a script can tell which object type a sheet of a Draft download holds, and the properties that make up an object's identifier in the order they are joined, so a script can work out the identifier of each object listed on that sheet. Custom Properties of an object in another URL are now read from that URL. A Document Template can no longer list every object in a URL that uses a Label, a Custom Property, a Project Role or an object type. Read these from the Draft, Test Case or Ticket instead.

5581

Feature

92

An Import Script now asks for the files it reads as settings, so a script can read more than one file, or none at all. A script that already read a file has been given a setting called File for it, which the script reads as importer.settings["file"].

5547

Feature

92

A script can now create Forms as well as records of the object types you define. The attributes are the Form's own columns, named as the ALS workbook names them, together with any custom properties your URL has added to Forms. A Form has to be given an OID and a name, and the Draft cannot already hold a Form with either of them. The other built-in object types cannot be created from a script yet, and the command says so by name.

5548

Feature

92

A script can now create records of an object type, not just the object type itself. One command creates one record with the values it holds, naming the attributes as the object type names them. A record of an object type that sits inside another names its parent by identifier, and an attribute that points at another record names it the same way.

5536

Feature

92

The help now lists every command a script can issue, with what each one does, the arguments it takes and the values each argument allows.

5482

Feature

92

Applying the commands from an Import Script run happens in the background and reports progress as it works, so a run which asks for many commands is not limited by how long a page can wait.

5434

Feature

92

Import Scripts can create a draft, link it to a standard library, copy named forms from that library and then import every other library object those forms make applicable. Objects which need a visit folder the new draft does not have are not imported.

5513

Feature

92

Script capabilities are now documented under their own Script module in the validation documentation, with a page describing what a script can do and the controls on it. Entries previously listed under Study build now appear under Script.

5481

Feature

92

An Import Script command can now say which URL, Project or Draft it acts on, so one script can build the same objects in several of them.

5425

Feature

92

An Import Script can now apply commands that act on a URL, not only on the Organization.

5390

Feature

92

An Import Script can now read a spreadsheet cell by cell, for files that hold a value at a known address such as D7 or key and value pairs down two columns, instead of only a table under a header row.

5370

Feature

92

An Import Script test run can now apply the commands it built, after you have reviewed them. A script can also walk a file whose shape it does not know in advance - taking a row's column names and values together in the order the sheet declares them, or asking a document what keys it holds - and asking a file for something the other kind of file offers now says which kind was uploaded instead of naming an internal type.

5323

Feature

91

A test run of an Import Script can now be pointed at a Draft, Project or URL, and the script can read from it. Settings that name a Draft, Project or URL are chosen from the same searchable list, with Projects that hold Standard libraries marked.

5262

Feature

91

Import Scripts can now be tested against a real file, showing what the script would do without changing anything.

5246

Feature

91

Import Scripts can now declare the settings they need.

5237

Feature

91

Organizations can now register Import Scripts, ready for importing data from Excel, JSON and YAML files.