Plugin List Execute | |
Introduced in Tiki11, the LISTEXECUTE plugin is an extensible plugin allowing administrators to set-up listings and custom actions that can be executed on objects, allowing to support complex workflows and perform some level of automation. The LISTEXECUTE plugin uses the Search and List from Unified Index to extract lists of objects. All filters available in PluginList can also be used with LISTEXECUTE. Results are presented as a list with checkboxes for each row. Actions can be performed on selected objects. |
Parameters | |||
Set custom actions that can be executed on a filtered list of objects
Sample usage Copy to clipboard
As you can see, the plugin uses a structure of fake plugins to define the behavior.
Multiple groups Copy to clipboard
Each step must defined the action attribute, which is associated with a specific behavior. Each action defines a set of parameters it can accept. The value for those parameters can be set statically in the definition or taken dynamically from the search results, or custom FORMAT blocks by using the In the example, the Sample usage: custom subject Copy to clipboard
Additionally, multiple fields can be provided.
|
Actions | |
To set an action as
|
| |
Applies to tracker items. Allows to change the status from one state to an other.
Sample usage: closing items Copy to clipboard
|
| ||||||||
Removes the object from Tiki.
Supported object types:
Sample usage: delete Copy to clipboard
|
| |
Sends an email to the specified recipient.
Optional fields:
If email value comes from field that are itemLink, itemList or DynamicItemList type you'll need to add the parameter _text at the end of the permname. Copy to clipboard
|
| |
Added in Tiki17. Overlays some text on top of jpeg images attached to a tracker item which are stored in a file gallery. Copy to clipboard
Parameters:
Replacement keys for filegal_image_overlay: Copy to clipboard
Example of usage: Copy to clipboard
|
| |
Added in Tiki17. Renames files attached to a tracker item which are stored in a file gallery.
Replacement keys for filegal_change_filename: Copy to clipboard
Example of usage: Copy to clipboard
File and EmailEmailing a link to the file is not currently possible via ItemsList field and it may be not advised (due to security and anti-spam consideration). Instead, you can insert a link to the file with the "&display" parameter to display an image or without to initiate a download (if required user must be logged), something like this to the email content: Copy to clipboard
You may also consider to insert a link that will display your image or file or any other information. (see below) Dynamic Link in the EmailThanks to Wiki Argument Variables it is possible to include a link to a page to display part of the information related to the object_id or any wiki dynamic variable you set and that will display filtered tracker item information. It can also inforce security or add validation options (page to display the data may require login and it can be tracked) IE: You want to display a member ID card that include text (name, adresse and a photo).
This is one example and there are many ways for you to use it. |
| |
Added in Tiki23: http://sourceforge.net/p/tikiwiki/code/78296 |
| |
Added in Tiki22 New action tracker_item_clone has been added. The function was enhanced to allow emptying fields and to set a field with default value (like a date field) This code is also checking if the item has children through item link, if items in other trackers are linked to the parent item using an item link tracker field. If items are found they are also duplicated silently. See Trackers; Duplicate a trackeritem on an item used in another tracker will create duplication for all the items where the original item is used Cloning tracker item and resetting selected fieldsIn this sample we clone an item and modify some values of the new created item;
Duplicate an item, change status, reset productsboughtDate to today (default) and reset the values of 3 fields using calculations and empty value Copy to clipboard
|
| |
Modifies a single field out of a tracker item. Performance and field checking To preserve performance and usability the previous and nature of the fields are not continuously checked. When you add a value using this method it is added as hardcoded string without checking the parameters and options of the existing field.
For exemple, if you have a dropdown field with specified values (value1, value2 and value3) it is possible to insert a value that is not in the existing options (value4) without warning or error about it. This can lead to weird behaviour if you have other tools (search, filtering, relations, etc.) depending on the value of this field. This is advanced usage and it is expected that you know what you are doing (still triple check for typos. 😉 )
To let the end user pick a value to be removed Copy to clipboard
To let the end user pick a value to be added Copy to clipboard
To set directly a value (it will replace anything else) Copy to clipboard
To exchange a value (as seen above) you can also use several action Copy to clipboard
|
| |
Adding in Tiki24 the action tracker_item_insert gives the possibility to add a new entry in a tracker of your choice. on the other hand if the field and value are not prescribed the insertion to insert a new empty line which can be modified by the action tracker_item_modify. options:
Note: At the time of insertion it is only possible to insert one value. if the tracer carries a field identifying an auto-increment it will be filled in automatically. the values of other fields that you want to insert will be filled with the tracker_item_modify action. example of usage with optional field Copy to clipboard
example of use without optional fields Copy to clipboard
|
| |
Added in Tiki24. This allow to assign (add) or unassigned (remove) a user. You can specify param user="some_user" or use user_field="tracker_field_perm_name" to get the user from the tracker field (user selector) of the item you execute the action against. Note that UserSelector tracker field can hold multiple users, so the action will be executed on all of the stored users in that item. The same permissions are enforced as the other places in the Tiki changing user groups - current user (the one logged when executing the action) should have permission to group_add_member or group_remove_member OR user should have permission to join group of the target group. The table template (templates/search/list/table.tpl) has been updated to insert manually a value for a group. Assign or unassign a user to/from a group that you can enter in the list execute interface.The field tracker_field_userid point to a user selector. Assign user to a group Copy to clipboard
un-assign user to a group Copy to clipboard
Assign or un-assign a user to/from a specific groupThe field tracker_field_userid point to a user selector. Assign user to the group Legal Copy to clipboard
Remove a user from the group Legal Copy to clipboard
|
| |
Marks the page as approved.
|
| |
Added in Tiki26. This allow to categorize (add) or uncategorize (remove) an object from Category. Example 1: Add the wiki pages to be selected to the category with ID 1. Copy to clipboard
Example 2: Remove the wiki pages to be selected to the category with ID 1. Copy to clipboard
Example 3: Add/delete wiki pages to be selected from the categories (multiple categories) indicated in the tree category. In this example, PluginListexecute combines the two actions (add/remove). Copy to clipboard
Screenshot:
|
Batch processing | |
You may want to use this plugin to automate jobs on your site. To do so, you can use the command line cURL tool to post a request to the page. Or since Tiki17, the action can be run through console.php avoiding to use http authentication and the credentials in clear in the command line. Before Tiki17: Copy to clipboard
If your action requires elevated access rights, you can enable HTTP Basic Authentication in Tiki, create a user in tiki with enough permissions to run the action from listexecute, and use the authentication options in curl, so that the command would be like: Copy to clipboard
Since Tiki15 - Backported from Tiki17: Copy to clipboard
If you see this type of error message: Copy to clipboard
You may need to update the database schema first, with the usual: Copy to clipboard
|
Automatisation using Tiki Scheduler | |
Since Tiki17 you can use Tiki Scheduler to automatise plugin List Execute actions. Note if you use the url parameter you have to use a shell command and curl; Copy to clipboard
Since Tiki18 you can use the url parameter with the console command; Copy to clipboard
If you use tracker fields output with Email action and it contains relative links (to tracker items, for example), you can work around it from Tiki18, this way: Copy to clipboard
|
Output | |
Since Tiki16 (backported to Tiki 15.3 ) you can use the same syntax to define columns, output, alternative results, etc, as it's possible with PluginList to customize the columns you want to display for each record shown. You can see and play with a working example by means of applying the profile Execute on List. |
Customising the output template (advanced) | |
You can make a copy of |
See also | |
|
Some examples | |
Modify the value of a tracker fieldIn this case we set the value of the dropdown tracker field "paymentsStage" from anything it was (empty or a different value) to "Completed". As per Tiki23, note that this is hardcoded string, meaning that even if the value doesn't exist in the dropdown options it will be set as is. Copy to clipboard
Display a list base on expiry date, with mass action to send an emailBefore Tiki17: In the listExecute plugin we list all the contract where "endDate" is in the date range we want (30 days from now) and where the field "alert1Sent" is not equal to "y". The output give us a display of the results. This to test and monitor that all work ok or to manually select items on which the action will be applied. In the format we add the listExecute action and steps. Step 1 will set the "alert1Sent" flag to "y" (so the item will be move away from list and the email won't be sent each time action is initiate). Step 2 will send an email with a proper subject and body (set below) to "alertTo" destination mail. Note: I tried to add a variable in the subject like the "contractTitle" or "objectId" but it is not working. Also in the format we have the "email_content", the body of your email that work fine with text and variables. Copy to clipboard
You can use this page manually (opening the page and checking item then applying action) or you can set a cronjob (like explained above). Using a cronjob to automatise the alert email processTo use this listExecute within a cronjob you need to go to "tiki-admin.php?page=login" and to enable "HTTP Basic Authentication" (Preference name: login_http_basic). Then in a terminal you can use the following; Copy to clipboard
List of all tickets, with mass action to re-openCopy to clipboard
Display open items with empty date + set current timestamp or change category + change statusThe syntax below for filtering on empty fields (exact="") assumes you are using MYSQL as unified search index engine. Copy to clipboard
Display custom columns with table sorter and inline editionExample taken from the profile Execute on List. Display custom columns with table sorter and inline edition Copy to clipboard
|
Related pages | |