Copyright © Xerox Corporation, Codendi Team, 2001-2006. All Rights Reserved



Tuleap Command Line Interface (CLI) documentation



Version 1.5.2
22-Apr-2013


Authors

Marc Nazarian
Xerox, Marc.Nazarian@xrce.xerox.com
Hatem Ounis
STMicroelectronics, hatem.ounis@st.com
Nouha Terzi
STMicroelectronics, nouha.terzi@st.com
Manuel Vacelet
Enalean, manuel.vacelet@enalean.com

This document is licensed under the GNU General Public License version 2.

Portion of this documentation is inspired from the GForge Command-line Interface documentation contained in GForge.

Copyright 2005 GForge, LLC

http://gforge.org/

Xerox ®, The Document Company ®, and all Xerox products mentioned in this publication are trademarks of Xerox Corporation.

This document was formatted with the DocBook XML DTD. HTML version rendered with DocBook HTML native renderer. PDF version rendered with Apache FOP.

Examples illustrated in this document are in some cases different from the real output.


Chapter 1. Installation

In order to install Tuleap's Command Line Interface (CLI), you must have PHP5 installed on your local machine (CLI won't work with PHP4). The latest PHP 5 version is highly recommended. Also, PHP must be compiled without the --disable-cli parameter in order to create the PHP binaries.

You must check in which directory you have your PHP binary installed. The directory is the prefix that was specified when compiling PHP (if no prefix was defined, it defaults to /usr, so the PHP binary is located in /usr/bin/php).

How to know where PHP binary is located ?

You can check in which directory it is installed by issuing the following command:

# which php
/usr/bin/php
            
In this case, the PHP binary is /usr/bin/php.

If you intend using the CLI for administering a Tuleap installation via an HTTPS connection, you must compile PHP with the CURL extension (using the --with-curl option in the configure script).

Once you have PHP properly installed, you must download and uncompress the CLI to a directory in your local machine.

Once you've uncompressed the CLI, you must edit $PREFIX/tuleap.php (where $PREFIX is the directory in which the CLI was uncompressed) using your favorite editor and change the following:

  1. Change the first line which says:

    #!/usr/bin/php -q
                
    to make it point to the path of the PHP binary in your machine (if it is different from /usr/bin/php)

  2. Find the Configuration section in the script (marked between comments) and change the following constants:

    • CODENDI_CLI_DIR: Points to the directory where the CLI auxiliary files are to be found. It usually is $PREFIX/include/.

    • WSDL_URL (optional): URL of the WSDL of your Tuleap's SOAP server. It is probably located in http://tuleap.net/soap/index.php?wsdl. You can see if the URL is correct by entering it in your browser, you should get an XML file from the server as the result. If this variable isn't set, the CLI will try to use the WSDL specified in the TULEAP_WSDL environment variable.

  3. Make sure the tuleap.php script has execution permissions. If not, set the permission by issuing the following command:

    chmod +x $PREFIX/tuleap.php
                    

After everything is properly set up, you must test the installation works correctly. For this, try logging into the server by issuing a "login" command. For this, change your current working directory to the directory in which you uncompressed the CLI and execute the following:

[mnazaria@linux tuleap-cli]$ ./tuleap.php -v login --username=(your user) --password=(your password)
CodendiSOAP::Connecting to the server http://tuleap.net/soap/index.php?wsdl...
CodendiSOAP::Connected!
CodendiSOAP::Executing command login...
Logged in as user (your user) , using session string MTAyLSotMTEyMzA4Mjg5My0qLTEyNy4wLjAuMS0qLU51U09BUC8wLjYuOSAoMS4xLjEuMSk=824c9f9010931f7872f4b9826c460ed3
Logged in.
            

Example 1. login command

The message you see may vary depending on the configuration of your server. If you get an error like "Fatal error: wsdl error: HTTP ERROR: Couldn't open socket connection to server http://tuleap.net prior to connect().", it means that your computer can't connect to the Tuleap server. In this case, you must make sure the address is written correctly and that you can access the server from your computer.

Chapter 2. Usage

The basic form for invoking the CLI is the following:

# ./tuleap.php [program options] [module name] [function name] 
[function parameters]
        

  • Program options:

    • -v : Verbose. Give a detailed output of what’s going on.

    • -h: Help. Display help on how to use the program.

    • --retry N: Retry operation N times (Default: 0). If API call fails due to a network issue, re-issue call until it succeeds or at max N times. This option is safe with Read actions (get) but use it carefully with write (add/update/delete) ones.

  • Module name: A "module" is a grouping of functions that act over a specific part of the Tuleap system. Currently, the following modules are available:

    • (none): If the module is empty, system-wide functions are accesible (i.e., login to the server)

    • tracker: Tracker management module

    • frs : File releases management module

    • docman : Documents management module

  • Function name: The name of the function to invoke depends on the module being called. For details, see Chapter 3.

  • Function parameters: The parameters also depend on the function being called. See Chapter 3.

NOTE: the accentuated letters are not supported in the CLI.

NOTE: a star (*) near a command argument means the argument is mandatory. For instance getArtifacts --tracker_id* means you have to provides a --tracker_id parameter to getArtifacts command.

Chapter 3. Module functions and parameters

3.1 Core functions

These functions do not act over a specific module. They are the following:

3.1.1 login

login: Log in to the server

  • --username: Specifies the name of the user you'll be working with. The username is the one you usually use in the Tuleap login page.

  • --password: Specifies the password to login with. If none is provided, you will be asked for one interactively.

  • --host: Specifies the host where your Tuleap server (as well as the soap server) is installed (optional).

  • --proxy: Specifies the proxy if needed. Use is --host=proxy_host:proxy_port

  • --project: UNIX name of the project you plan working on. If you don't specify this, any future function call will require you to specify the project in which the function will be applied.

[ounis@linux tuleap-cli]$ ./tuleap.php login --username=john --password=johnpass --project=myproject
+---------+----------------------------------+
| user_id |           session_hash           |
+---------+----------------------------------+
| 103     | de6bb9f64e0ad45a0a0209f112f774f7 |
+---------+----------------------------------+
Logged in.
(OR)
[ounis@linux tuleap-cli]$ ./tuleap.php login --username=marc --project=myproject
Password:
+---------+----------------------------------+
| user_id |           session_hash           |
+---------+----------------------------------+
| 103     | de6bb9f64e0ad45a0a0209f112f774f7 |
+---------+----------------------------------+
Logged in.
                        

Example 2. login command

3.1.2 logout

logout: End a session. This removes all the information of the session from your computer.

[mnazaria@linux tuleap-cli]$ ./tuleap.php logout
Session terminated.
                        

Example 3. logout command

3.1.3 myprojects

myprojects : Display the list of the projects the user is member of.

[ounis@linux tuleap-cli]$ ./tuleap.php myprojects
+----------+------------+-----------------+-------------+
| group_id | group_name | unix_group_name | description |
+----------+------------+-----------------+-------------+
| 104      | project 1  | project1        | project1    |
| 105      | project 2  | project2        | project2    |
| 106      | project 3  | project3        | project3    |
| 107      | project 4  | project4        | project4    |
+----------+------------+-----------------+-------------+
                        

Example 4. myprojects command

3.2 Tracker functions

3.2.1 trackerlist

trackerlist: Display the list of the trackers for the project.

The structure is no longer returned with this function. If you need the structure of all the trackers of a project, please use the "trackers" function (See Section 3.2.2).

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker trackerlist --project=project1
+-------------------+----------+------------------+----------------------------------------------------...
| group_artifact_id | group_id |       name       |                         description                ...
+-------------------+----------+------------------+----------------------------------------------------...
| 116               | 104      | Bugs             | Bugs Tracker                                       ...
| 119               | 104      | Salome Bug       | Salome Bug Tracker                                 ...
| 120               | 104      | Scrum Backlog    | Scrum backlog used to store user stories and to pla...
| 118               | 104      | Support Requests | Support Requests Tracker                           ...
| 117               | 104      | Tasks            | Tasks Tracker                                      ...
+-------------------+----------+------------------+----------------------------------------------------...

[1]:
+-----------+-------------------+---------+------------------------------------+-------+
| report_id | group_artifact_id |  name   |            description             | scope |
+-----------+-------------------+---------+------------------------------------+-------+
| 116       | 116               | Bugs    | Bugs Report                        | P     |
| 100       | 116               | Default | The system default artifact report | S     |
+-----------+-------------------+---------+------------------------------------+-------+

[2]:
+-----------+-------------------+-------------+------------------------------------+-------+
| report_id | group_artifact_id |    name     |            description             | scope |
+-----------+-------------------+-------------+------------------------------------+-------+
| 119       | 119               | Salome Bugs | Salome Bugs Report                 | P     |
| 100       | 119               | Default     | The system default artifact report | S     |
+-----------+-------------------+-------------+------------------------------------+-------+

[3]:
+-----------+-------------------+---------+------------------------------------+-------+
| report_id | group_artifact_id |  name   |            description             | scope |
+-----------+-------------------+---------+------------------------------------+-------+
| 120       | 120               | Scrum   | Scrum Report                       | P     |
| 100       | 120               | Default | The system default artifact report | S     |
+-----------+-------------------+---------+------------------------------------+-------+

[4]:
+-----------+-------------------+---------+------------------------------------+-------+
| report_id | group_artifact_id |  name   |            description             | scope |
+-----------+-------------------+---------+------------------------------------+-------+
| 118       | 118               | SR      | Support Requests Report            | P     |
| 100       | 118               | Default | The system default artifact report | S     |
+-----------+-------------------+---------+------------------------------------+-------+

[5]:
+-----------+-------------------+---------+------------------------------------+-------+
| report_id | group_artifact_id |  name   |            description             | scope |
+-----------+-------------------+---------+------------------------------------+-------+
| 117       | 117               | Tasks   | Tasks Report                       | P     |
| 100       | 117               | Default | The system default artifact report | S     |
+-----------+-------------------+---------+------------------------------------+-------+
                        

Example 5. trackerlist command

3.2.2 trackers

trackers: Display the list of the trackers (with their structure) for the project.

As this function returns all the structures of all the trackers, it could be quite slow. If your project contains lot's of trackers, it would be better to use the "trackerlist" function (See Section 3.2.1), and then the "tracker" function (See Section 3.2.3) to get the structure of the tracker you are interested in.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker trackers --project=project1
+-------------------+----------+------------------+----------------------------------------------------...
| group_artifact_id | group_id |       name       |                         description                ...
+-------------------+----------+------------------+----------------------------------------------------...
| 116               | 104      | Bugs             | Bugs Tracker                                       ...
| 119               | 104      | Salome Bug       | Salome Bug Tracker                                 ...
| 120               | 104      | Scrum Backlog    | Scrum backlog used to store user stories and to pla...
| 118               | 104      | Support Requests | Support Requests Tracker                           ...
| 117               | 104      | Tasks            | Tasks Tracker                                      ...
+-------------------+----------+------------------+----------------------------------------------------...
[13]:
+----------+-------------------+----------+-------+-------------+----------+--------+
| field_id | group_artifact_id | value_id | value | description | order_id | status |
+----------+-------------------+----------+-------+-------------+----------+--------+
| 10       | 116               | 100      | None  |             | 10       | P      |
+----------+-------------------+----------+-------+-------------+----------+--------+

[14]:
+----------+-------------------+----------+-------+-------------+----------+--------+
| field_id | group_artifact_id | value_id | value | description | order_id | status |
+----------+-------------------+----------+-------+-------------+----------+--------+
| 7        | 116               | 103      | ounis |             | 0        |        |
| 7        | 116               | 100      | None  |             | 10       | P      |
+----------+-------------------+----------+-------+-------------+----------+--------+

[15]:
No results
(... list of trackers, field sets and fields ...)
                        

Example 6. trackers command

3.2.3 tracker

tracker: Display the structure of a tracker.

  • --tracker_id* : ID of the tracker.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker tracker --project=project1 --tracker_id=116
+-------------------+----------+------+--------------+-----------+------------+-------------+----------...
| group_artifact_id | group_id | name | description  | item_name | open_count | total_count | total_fil...
+-------------------+----------+------+--------------+-----------+------------+-------------+----------...
| 116               | 104      | Bugs | Bugs Tracker | bug       | -1         | 1           | 0        ...
+-------------------+----------+------+--------------+-----------+------------+-------------+----------...
[1]:
+--------------+-------------------+-------------------------------+---------+-------------------------...
| field_set_id | group_artifact_id |             name              |  label  |          description    ...
+--------------+-------------------+-------------------------------+---------+-------------------------...
| 49           | 116               | fieldset_default_bugs_lbl_key | Details | fieldset_default_bugs_de...
| 50           | 116               | fieldset_status_bugs_lbl_key  | Status  | fieldset_status_bugs_des...
+--------------+-------------------+-------------------------------+---------+-------------------------...
(... list of field sets and fields ...)
                        

Example 7. tracker command

3.2.4 list

list: Display a list of artifacts that belong to a specified tracker.

  • --tracker_id* : ID of the tracker.

  • --limit: Maximum number of returned artifacts.

  • --offset: Numbers of returned artifact that will be skipped (offset parameter can not stand alone, it works with limit parameter).

  • --[field_name][operator][value]: criteria to filter the returned artifacts. Works with standard fields and custom fields.

    Example : "--open_date>2006-05-21" --assigned_to=135 --status_id=0.

    Allowed operators are >, >=, =, <, <=, <>.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker list --tracker_id=116
+------------------------+-----------+
| total_artifacts_number | artifacts |
+------------------------+-----------+
| 1                      | [1]       |
+------------------------+-----------+

[1]:
+-------------+-------------------+-----------+--------------+------------+------------+---------------...
| artifact_id | group_artifact_id | status_id | submitted_by | open_date  | close_date | last_update_da...
+-------------+-------------------+-----------+--------------+------------+------------+---------------...
| 2           | 116               | 3         | 103          | 1289480620 | 1291276352 | 1291276353    ...
+-------------+-------------------+-----------+--------------+------------+------------+---------------...

[1]:
+----------+-------------+-------------+
| field_id | artifact_id | field_value |
+----------+-------------+-------------+
| 3        | 2           | 100         |
| 4        | 2           | 100         |
| 16       | 2           | 100         |
| 20       | 2           | 100         |
+----------+-------------+-------------+
                    

Example 8. list command

3.2.5 reportlist

reportlist: Display a list of artifacts that belong to a specified tracker, with the specific report.

  • --tracker_id* : ID of the tracker.

  • --limit: Maximum number of returned artifacts.

  • --offset: Numbers of returned artifact that will be skipped (offset parameter can not stand alone, it works with limit parameter).

  • --[field_name][operator][value]: criteria to filter the returned artifacts. Works with standard fields and custom fields.

    Example : "--open_date>2006-05-21" --assigned_to=135 --status_id=0.

    Allowed operators are >, >=, =, <, <=, <>.

  • --sort={[field_name] [sort_direction]}*: criteria to sort the returned artifacts. Works with standard fields and custom fields.

    Example : --sort="severity DESC, open_date DESC, artifact_id ASC".

    Allowed directions are ASC (ascendant) and DESC (descendant).

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker reportlist --tracker_id=116
+------------------------+-----------+
| total_artifacts_number | artifacts |
+------------------------+-----------+
| 1                      | [1]       |
+------------------------+-----------+

[1]:
+-------------+----------+--------+
| artifact_id | severity | fields |
+-------------+----------+--------+
| 2           | 5        | [1]    |
+-------------+----------+--------+

[1]:
+--------------+---------------+
|  field_name  |  field_value  |
+--------------+---------------+
| artifact_id  | 2             |
| summary      | bug           |
| open_date    | 1289480620    |
| assigned_to  | None          |
| submitted_by | ounis         |
+--------------+---------------+
                    

Example 9. reportlist command

3.2.6 reports

reports: Retrieve all the reports of a given tracker.

  • --tracker_id*: the Tracker ID we want to retrieve the reports.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker reports --tracker_id=116
+-----------+-------------------+---------+------------------------------------+-------+--------+
| report_id | group_artifact_id |  name   |            description             | scope | fields |
+-----------+-------------------+---------+------------------------------------+-------+--------+
| 116       | 116               | Bugs    | Bugs Report                        | P     | [1]    |
| 100       | 116               | Default | The system default artifact report | S     | [2]    |
+-----------+-------------------+---------+------------------------------------+-------+--------+

[1]:
+-----------+--------------+---------------+----------------+-------------+--------------+-----------+
| report_id |  field_name  | show_on_query | show_on_result | place_query | place_result | col_width |
+-----------+--------------+---------------+----------------+-------------+--------------+-----------+
| 116       | status_id    | 1             | 0              | 40          | 0            | 0         |
| 116       | bug_group_id | 1             | 0              | 20          | 0            | 0         |
| 116       | category_id  | 1             | 0              | 10          | 0            | 0         |
| 116       | artifact_id  | 0             | 1              | 0           | 10           | 0         |
| 116       | summary      | 0             | 1              | 0           | 20           | 0         |
| 116       | open_date    | 0             | 1              | 0           | 30           | 0         |
| 116       | assigned_to  | 1             | 1              | 30          | 40           | 0         |
| 116       | submitted_by | 0             | 1              | 0           | 50           | 0         |
+-----------+--------------+---------------+----------------+-------------+--------------+-----------+

[2]:
+-----------+--------------+---------------+----------------+-------------+--------------+-----------+
| report_id |  field_name  | show_on_query | show_on_result | place_query | place_result | col_width |
+-----------+--------------+---------------+----------------+-------------+--------------+-----------+
| 100       | category_id  | 1             | 0              | 10          |              |           |
| 100       | severity     | 0             | 0              |             |              |           |
| 100       | status_id    | 1             | 0              | 20          |              |           |
| 100       | artifact_id  | 1             | 1              | 50          | 10           |           |
| 100       | summary      | 0             | 1              |             | 20           |           |
| 100       | open_date    | 1             | 1              | 40          | 30           |           |
| 100       | assigned_to  | 1             | 1              | 30          | 40           |           |
| 100       | submitted_by | 0             | 1              |             | 50           |           |
+-----------+--------------+---------------+----------------+-------------+--------------+-----------+
                    

Example 10. reports command

3.2.7 add

add: Add a new artifact to a tracker

  • --tracker_id* : ID of the tracker the new artifact will belong to.

  • --summary: Summary for the artifact.

  • --details: Details for the artifact.

  • --status_id: Status_id of the artifact.

  • --severity: Severity of the artifact (1: lowest, 9: highest).

  • --[extra_field_name]: Extra field value. extra_field_name must be the name of the extra field (field_name). The value of the extra field depends on its type. For multiple-value fields, separate the values with a comma.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker add --tracker_id=116 --summary="Back button is not working" --details="When I read my email and I press the back button, a blank page appears" --severity=4 --assigned_to=103
Confirm you want to add a new artifact with the following information:
summary: Back button is not working
details: When I read my email and I press the back button, a blank page appears
severity: 4
group_id: 104
group_artifact_id: 116
assigned_to: 103
Is this information correct? (y/n): y
+--------+
| Result |
+--------+
| 40     |
+--------+
                    

Example 11. add command

Note: In this example, "assigned_to" corresponds to an extra_field and 103 is a valid value ID for this extra field. The value returned (40) is the ID of the new artifact.

3.2.8 update

update: Update an artifact information

  • --tracker_id* : ID of the tracker the artifact to update belong to.

  • --id* : ID of the artifact to update.

  • --status_id: New status_id of the artifact

  • --summary: Summary for the artifact.

  • --details: Details for the artifact.

  • --severity: Severity of the artifact (1: lowest, 9: highest).

  • --[extra_field_name]: Extra field value. extra_field_name is the name of the extra field. The value of the extra field depends on its type.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker update --tracker_id=116 --id=40 --severity=6
Confirm you want to add a new artifact with the following information:
severity: 6
group_id: 104
group_artifact_id: 116
artifact_id: 40
Is this information correct? (y/n): y
+--------+
| Result |
+--------+
| 40     |
+--------+
                    

Example 12. update command

3.2.9 comments

comments: Retrieve all the messages posted in an artifact.

  • --tracker_id*: Tracker ID.

  • --id*: Artifact ID.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker comments --tracker_id=116 --id=40
+-------------+--------------+------------------+------------+---------------+-------+-------------+---...
| artifact_id | follow_up_id |     comment      |    date    | original_date |  by   | original_by | co...
+-------------+--------------+------------------+------------+---------------+-------+-------------+---...
| 40          | 559          | Yet another one  | 1293718666 | 1293718666    | ounis | ounis       | 10...
| 40          | 558          | Another comment  | 1293718652 | 1293718652    | ounis | ounis       | 10...
| 40          | 556          | comment by ounis | 1293718608 | 1293718608    | ounis | ounis       | 10...
+-------------+--------------+------------------+------------+---------------+-------+-------------+---...
                    

Example 13. comments command

3.2.10 addComment

addComment: Post a new follow-up comment in an artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --id*: Artifact ID.

  • --message*: Message to post.

  • --comment_type_id: Comment type to add to the comment (optional).

  • --format: Format of the comment, can be 'text' or 'html' (optional).

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker addComment --tracker_id=116 --id=40 --format=html --message="I agree with you"

+--------+
| Result |
+--------+
| 1      |
+--------+
                    

Example 14. addComment command

3.2.11 updateComment

updateComment: Update an existing follow-up comment in an artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --artifact_id*: Artifact ID.

  • --comment_id*: The Follow-up ID.

  • --comment*: the new follow-up comment.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker updateComment --tracker_id=116 --artifact_id=40 --comment_id=560  --comment="This comment will replace the former one"
+--------+
| Result |
+--------+
| 1      |
+--------+
                    

Example 15. updateComment command

3.2.12 deleteComment

deleteComment: Delete an existing follow-up comment in an artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --artifact_id*: Artifact ID.

  • --comment_id*: The Follow-up ID.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker deleteComment --tracker_id=116 --artifact_id=40 --comment_id=560
+--------+
| Result |
+--------+
| 1      |
+--------+
                    

Example 16. deleteComment command

3.2.13 CCList

CCList: Retrieve the CC list of an artifact.

  • --tracker_id*: Tracker ID.

  • --id*: Artifact ID.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker CCList --tracker_id=116 --id=40
+----------------+-------------+----------------------+----------+---------------+---------+------------+
| artifact_cc_id | artifact_id |        email         | added_by | added_by_name | comment |    date    |
+----------------+-------------+----------------------+----------+---------------+---------+------------+
| 1              | 40          | nouha.terzi@st.com   | 103      | ounis         |         | 1293720479 |
| 2              | 40          | ounis                | 103      | ounis         |         | 1293720479 |
| 3              | 40          | salma.moakhar@st.com | 103      | ounis         |         | 1293720479 |
+----------------+-------------+----------------------+----------+---------------+---------+------------+
                    

Example 17. CCList command

3.2.14 addCC

addCC: Add a list of emails or logins in CC of a given artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --id*: Artifact ID.

  • --cc_list*: List of emails and/or logins to add in the CC list.

  • --cc_comment: Optionnal comment associated with the added CC list.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker addCC --tracker_id=116 --id=40 --cc_list="nouha.terzi@st.com, ounis, salma.moakhar@st.com"
+--------+
| Result |
+--------+
| 1      |
+--------+
                    

Example 18. addCC command

3.2.15 deleteCC

deleteCC: Delete a CC of a given artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --id*: Artifact ID.

  • --cc_id*: ID of the CC we want to delete.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker deleteCC --tracker_id=116 --id=40 --cc_id=2
+--------+
| Result |
+--------+
| 1      |
+--------+
                    

Example 19. deleteCC command

3.2.16 dependencies

dependencies: Retrieve all the dependencies of a given artifact.

  • --tracker_id*: the Tracker ID we want to retrieve the dependencies.

  • --id*: Artifact ID we want to retrieve the dependencies.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker dependencies --tracker_id=116 --id=40
+--------------------+-------------+-----------------------------+-------------+------------+----------...
| artifact_depend_id | artifact_id | is_dependent_on_artifact_id |   summary   | tracker_id | tracker_n...
+--------------------+-------------+-----------------------------+-------------+------------+----------...
| 25                 | 40          | 41                          | Another bug | 116        | Bugs     ...
+--------------------+-------------+-----------------------------+-------------+------------+----------...
                    

Example 20. dependencies command

3.2.17 inverseDependencies

inverseDependencies: Retrieve all the inverse dependencies of a given artifact.

  • --tracker_id*: the Tracker ID we want to retrieve the inverse dependencies.

  • --id*: Artifact ID we want to retrieve the inverse dependencies.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker inverseDependencies --tracker_id=116 --id=40
+--------------------+-------------+-----------------------------+-----------------+------------+------...
| artifact_depend_id | artifact_id | is_dependent_on_artifact_id |     summary     | tracker_id | track...
+--------------------+-------------+-----------------------------+-----------------+------------+------...
| 26                 | 41          | 40                          | Another bug     | 116        | Bugs ...
| 27                 | 42          | 40                          | yet another bug | 116        | Bugs ...
+--------------------+-------------+-----------------------------+-----------------+------------+------...
                    

Example 21. inverseDependencies command

3.2.18 addDependencies

addDependencies: Add a list of dependencies to a given artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --id*: Artifact ID.

  • --dependencies*: list of dependencies to add, separated with a comma.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker addDependencies --tracker_id=116 --id=40 --dependencies="41"
+--------+
| Result |
+--------+
| 1      |
+--------+
                    

Example 22. addDependencies command

3.2.19 deleteDependency

deleteDependency: Delete a dependency of a given artifact.

  • --tracker_id*: Tracker ID the artifact belongs to.

  • --id*: Artifact ID.

  • --dependency*: ID of the dependency we want to delete.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php deleteDependency tracker --tracker_id=116 --id=40 --dependency=41
+--------+
| Result |
+--------+
| 41     |
+--------+
                    

Example 23. deleteDependency command

3.2.20 artifactHistory

artifactHistory: Retrieve the history of the fields of a given artifact.

  • --tracker_id*: the Tracker ID we want to retrieve the history.

  • --id*: Artifact ID we want to retrieve the history.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker artifactHistory --tracker_id=116 --id=40
+------------+-----------------------------------------------+-----------------------------------------...
| field_name |                   old_value                   |                   new_value             ...
+------------+-----------------------------------------------+-----------------------------------------...
| cc         | nouha.terzi@st.com,ounis,salma.moakhar@st.com | nouha.terzi@st.com,salma.moakhar@st.com ...
| cc         |                                               | nouha.terzi@st.com,ounis,salma.moakhar@s...
| comment    | I agree with you                              |                                         ...
| comment    | I agree with you                              | In fact i don't agree                   ...
| summary    | Increased priority                            | Back button is not working              ...
| summary    | Back button is not working                    | Increased priority                      ...
| severity   | 4                                             | 6                                       ...
+------------+-----------------------------------------------+-----------------------------------------...
                    

Example 24. artifactHistory command

3.2.21 attachedFiles

attachedFiles: Show a list of files attached to the artifact (content of files is not present).

  • --tracker_id*: Tracker ID.

  • --artifact_id*: Artifact ID.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker attachedFiles --tracker_id=116 --artifact_id=40
+----+-------------+----------+-------------------+----------+----------+------------+------------+----...
| id | artifact_id | filename |    description    | bin_data | filesize |  filetype  |  adddate   | sub...
+----+-------------+----------+-------------------+----------+----------+------------+------------+----...
| 2  | 40          | file2    | file2 description |          | 14       | text/plain | 1293721808 | oun...
| 1  | 40          | file1    | file1 description |          | 14       | text/plain | 1293721737 | oun...
+----+-------------+----------+-------------------+----------+----------+------------+------------+----...
                    

Example 25. attachedFiles command

3.2.22 attachedFile

attachedFile: Download an attached file from an artifact.

  • --tracker_id*: Tracker ID.

  • --artifact_id*: Artifact ID.

  • --file_id*: ID of the file to download.

  • --output: File name to save the file as. If not specified, the contents of the file are outputted to the screen.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker attachedFile --tracker_id=116 --artifact_id=40 --file_id=2 --output=./file2
File retrieved successfully.
                    

Example 26. attachedFile command

3.2.23 addAttachedFile

addAttachedFile: Attach a file to an artifact.

  • --tracker_id*: Tracker ID.

  • --artifact_id*: Artifact ID.

  • --file*: Local file to attach.

  • --description: Description of the file.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker addAttachedFile --tracker_id=116 --artifact_id=40 --file=file2 --description="file2 description"
+--------+
| Result |
+--------+
| 2      |
+--------+
                    

Example 27. addAttachedFile command

Note: The value returned (2) is the ID of the deleted file.

3.2.24 deleteAttachedFile

deleteAttachedFile: Delete an attached file from an artifact.

  • --tracker_id*: Tracker ID.

  • --artifact_id*: Artifact ID.

  • --file_id*: ID of the file to delete.

  • --project: UNIX name of the project. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php tracker deleteAttachedFile --tracker_id=116 --artifact_id=40 --file_id=2
+--------+
| Result |
+--------+
| 2      |
+--------+
                    

Example 28. deleteAttachedFile command

Note: The value returned (2) is the ID of the new file.

3.3 File Release System functions

File release system can return standard error codes:

  • 'invalid_package_fault' (code '3017'): the package doesn't exist

  • 'invalid_release_fault' (code '3018'): the release doesn't exist

  • 'invalid_file_fault' (code '3019'): the file doesn't exist

3.3.1 getPackages

getPackages: Display a list of available packages for a project

  • --project: UNIX name of the project you want to retrieve the packages in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs getPackages --project=project1
+------------+----------+----------------+-----------+------+-----------------+
| package_id | group_id |      name      | status_id | rank | approve_license |
+------------+----------+----------------+-----------+------+-----------------+
| 198        | 104      | package2       | 1         | 1    |                 |
| 197        | 104      | my_new_package | 1         | 2    |                 |
+------------+----------+----------------+-----------+------+-----------------+
                        

Example 29. getPackages command

3.3.2 addPackage

addPackage: Add a package to the File Release System

  • --name*: name of the new package that will be created.

  • --status_id: status_id of the new package. By default, the status is active.

  • --rank: rank of the new package that will be created. By default, set to 0.

  • --approve_license: whether the package should ask for a license approval on file download. By default, set to 1 (ask approval).

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs addPackage --project=project1 --name="my_new_package" --status_id=1
+--------+
| Result |
+--------+
| 197    |
+--------+
                        

Example 30. addPackage command

Note: The value returned (197) is the ID of the new package.

3.3.3 getReleases

getReleases: Display a list of available releases for a project and a given package

  • --package_id*: the id of the package the releases belong to

  • --project: UNIX name of the project you want to retrieve the releases in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs getReleases --package_id=197
+------------+------------+---------------+--------------------------------+---------------------------...
| release_id | package_id |     name      |             notes              |             changes       ...
+------------+------------+---------------+--------------------------------+---------------------------...
| 144        | 197        | first version | somes notes about this release | first release             ...
| 143        | 197        | new version   | somes notes about this release | the changes of this new re...
+------------+------------+---------------+--------------------------------+---------------------------...
                        

Example 31. getReleases command

3.3.4 addRelease

addRelease: Add a release to the File Release System

  • --package_id*: id of the package this release will belong to

  • --name*: name of the new release that will be created.

  • --notes: notes about this new release

  • --changes: changes of this new release

  • --status_id: status_id of the new release. By default, the status is active.

  • --release_date: date of the new release, with YYYY-MM-DD format. By default, the release_date is the current date/time.

  • --project: UNIX name of the project you want to add the release in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs addRelease --package_id=197 --name="new version" --notes="somes notes about this release" --changes="the changes of this new release" --status_id=1
+--------+
| Result |
+--------+
| 143    |
+--------+
                        

Example 32. addRelease command

Note: The value returned (143) is the ID of the new release.

3.3.5 getFiles

getFiles: Display a list of available files for a project, a given package and a given release

  • --package_id*: the id of the package the files belong to

  • --release_id*: the id of the release the files belong to

  • --project: UNIX name of the project you want to retrieve the files in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs getFiles --package_id=197 --release_id=143
+---------+------------+-----------------+-----------+---------+--------------+--------------+---------...
| file_id | release_id |    file_name    | file_size | type_id | processor_id | release_time | post_dat...
+---------+------------+-----------------+-----------+---------+--------------+--------------+---------...
| 419     | 143        | p197_r143/file1 | 14        | 9999    | 9999         | 1293787567   | 12937875...
+---------+------------+-----------------+-----------+---------+--------------+--------------+---------...
                        

Example 33. getFiles command

3.3.6 addFile

Big file support: CLI is able to upload files bigger than 2GB when both CLI and remote server are running on top of 64 bits machines. If you ever need to release a big file in another case (client machine or server in 32 bits) you should use FTP for file upload and --uploaded_file option.

addFile: Add a file to the File Release System

  • --package_id*: id of the package this file will belong to

  • --release_id*: id of the release this file will belong to

  • --local_file(*): location (local) of the new file that will be created. Use this argument if your file is local. Your file will be uploaded on the server. One of the argument --local_file or --uploaded_file is required, depending the way you want to add your file.

  • --uploaded_file(*): location of the new file that will be created. The file must already be located in the incoming directory on the server. One of the argument --local_file or --uploaded_file is required, depending the way you want to add your file.

  • --type_id: type_id of the new file

  • --processor_id: processor_id of the new file

  • --reference_md5: md5 of the file located in the incoming directory on the server.

  • --comment: A comment for the new file

  • --project: UNIX name of the project you want to add the file in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

For local file md5sum is automatically calculated by CLI in client side, so the parameter reference_md5 is taken into consideration only for uploded files and it is absolutely useless to add it for a local file.

[ounis@linux tuleap-cli]$ ./tuleap.php frs addFile --package_id=197 --release_id=143 --local_file=file1
+--------+
| Result |
+--------+
| 419    |
+--------+

(for a local file or )

[ounis@linux tuleap-cli]$ ./tuleap.php frs addFile --package_id=197 --release_id=143 --uploaded_file=file2
+--------+
| Result |
+--------+
| 420    |
+--------+

(for a file already uploaded in the incoming directory of your server)
                        

Example 34. addFile command

Note: The value returned (420) is the ID of the new file.

3.3.7 getFile

Big file support: CLI is able to download files bigger than 2GB when both CLI and remote server are running on top of 64 bits machines.

getFile: Get the content of a file in the File Release System

  • --package_id*: id of the package the file belongs to

  • --release_id*: id of the release the file belongs to

  • --file_id*: id of the file we want to get the content

  • --output: output location to download the file. If not specified, the content of the file is displayed on the standard output

  • --remote_name: Use the name retrieved from the server instead of using --output

  • --project: UNIX name of the project you want to get the file. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs getFile --package_id=197 --release_id=143 --file_id=419 --output=./downloaded_file
File retrieved successfully.
                        

Example 35. getFile command

Note: no error returned, the file is downloaded successfully.

3.3.8 getUploadedFiles

getUploadedFiles: Get the list of files uploaded using ftp into the incoming directory

  • --project: UNIX name of the project you want to get the file. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs getUploadedFiles
+--------+
| Result |
+--------+
| file1  |
| file2  |
+--------+
                        

Example 36. getUploadedFiles command

3.3.9 deleteFile

deleteFile: Delete a file from the File Release System

  • --package_id*: id of the package the file belongs to

  • --release_id*: id of the release the file belongs to

  • --file_id*: id of the file we want to delete

  • --project: UNIX name of the project you want to delete the file. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs deleteFile --package_id=197 --release_id=143 --file_id=420
+--------+
| Result |
+--------+
| 1      |
+--------+
                        

Example 37. deleteFile command

Return code (1) means the deletion succeeded. Otherwise server throw an error.

3.3.10 getFileInfo

getFileInfo: Get informations about a file in the File Release System

  • --package_id*: id of the package the file belongs to

  • --release_id*: id of the release the file belongs to

  • --file_id*: id of the file we want to get the info

  • --project: UNIX name of the project you want to get the file info. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs getFileInfo --package_id=197 --release_id=143 --file_id=419
+---------+------------+-----------------+-----------+---------+--------------+--------------+---------...
| file_id | release_id |    file_name    | file_size | type_id | processor_id | release_time | post_dat...
+---------+------------+-----------------+-----------+---------+--------------+--------------+---------...
| 419     | 143        | p197_r143/file1 | 14        | 9999    | 9999         | 1293787567   | 12937875...
+---------+------------+-----------------+-----------+---------+--------------+--------------+---------...
                        

Example 38. getFileInfo command

3.3.11 deleteEmptyPackage

deleteEmptyPackage: Delete an empty package

  • --project: UNIX name of the project where empty packages will be deleted. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

  • --package_id*: Id of the package to delete

[ounis@linux tuleap-cli]$ ./tuleap.php frs deleteEmptyPackage --package_id=2953
+------------+----------+------+-----------+------+-----------------+
| package_id | group_id | name | status_id | rank | approve_license |
+------------+----------+------+-----------+------+-----------------+
| 2953       | 1        | test | 1         | 1025 |                 |
+------------+----------+------+-----------+------+-----------------+
                        

Example 39. deleteEmptyPackage command

Return value is the details of the deleted package.

3.3.12 deleteAllEmptyPackages

deleteAllEmptyPackages: Delete all empty packages for a given project

  • --project: UNIX name of the project where empty packages will be deleted. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[ounis@linux tuleap-cli]$ ./tuleap.php frs deleteAllEmptyPackages 
+------------+----------+----------------+-----------+------+-----------------+
| package_id | group_id |      name      | status_id | rank | approve_license |
+------------+----------+----------------+-----------+------+-----------------+
| 2959       | 1        | EmptyPackage   | 1         | 8    |                 |
| 2958       | 1        | testingCLI     | 1         | 9    |                 |
+------------+----------+----------------+-----------+------+-----------------+
                        

Example 40. deleteAllEmptyPackages command

Return value is the list of the deleted packages.

3.3.13 deleteEmptyRelease

deleteEmptyRelease: Delete the given release if empty

  • --project: UNIX name of the project where empty releases will be deleted. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

  • --package_id*: Id of the package where empty releases will be deleted.

  • --release_id*: Id of the release to delete.

[ounis@linux tuleap-cli]$ ./tuleap.php frs deleteEmptyRelease --package_id=288 --release_id=226
+------------+------------+---------------+-------+---------+-----------+--------------+-------------+
| release_id | package_id |     name      | notes | changes | status_id | release_date | released_by |
+------------+------------+---------------+-------+---------+-----------+--------------+-------------+
| 226        | 288        | empty release |       |         | 1         | 1323648000   | 103         |
+------------+------------+---------------+-------+---------+-----------+--------------+-------------+
                        

Example 41. deleteEmptyRelease command

Return value is the details of deleted release.

3.3.14 deleteAllEmptyReleases

deleteAllEmptyReleases: Delete all empty releases of the given package

  • --project: UNIX name of the project where empty releases will be deleted. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

  • --package_id*: Id of the package where empty releases will be deleted.

[ounis@linux tuleap-cli]$ ./tuleap.php frs deleteAllEmptyReleases --package_id=288
+------------+------------+---------------+-------+---------+-----------+--------------+-------------+
| release_id | package_id |     name      | notes | changes | status_id | release_date | released_by |
+------------+------------+---------------+-------+---------+-----------+--------------+-------------+
| 226        | 288        | empty release |       |         | 1         | 1323648000   | 103         |
| 224        | 288        | empty         |       |         | 1         | 1323648000   | 103         |
+------------+------------+---------------+-------+---------+-----------+--------------+-------------+
                        

Example 42. deleteAllEmptyReleases command

Return value is the list of deleted releases.

3.4 Document Manager functions

This module works with the docman plugin and will be available only if the plugin is installed.

3.4.1 list

list: Display a list of items contained in a folder

  • --id*: the ID of the folder.

  • --project: UNIX name of the project you want to retrieve the packages in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[terzino@linux tuleap-cli]$ ./tuleap.php docman list --id=110418 --project=myproject
+---------+-----------+----------+--------------+-------------+-------------+-------------+---------+--...
| item_id | parent_id | group_id |    title     | create_date | update_date | delete_date | user_id | s...
+---------+-----------+----------+--------------+-------------+-------------+-------------+---------+--...
| 110493  | 110418    | 1        | testSoap     | 1293189073  | 1293189073  |             | 101     | 1...
| 110491  | 110418    | 1        | CLI Document | 1293188351  | 1293188351  |             | 101     | 1...
+---------+-----------+----------+--------------+-------------+-------------+-------------+---------+--...
                        

Example 43. list command

3.4.2 getRoot

getRoot: Returns the document object id that is at the top of the docman given a group object

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[terzino@linux tuleap-cli]$ ./tuleap.php docman getRoot --project=myproject 
+--------+
| Result |
+--------+
| 2      |
+--------+

                        

Example 44. getRoot command

3.4.3 createEmbeddedFile

createEmbeddedFile: Add a document embedded file to the document manager

  • --parent_id*: ID of the parent the file will be created in

  • --project*:Name of the project the item belongs to. If you specified the name of the working project when you logged in, this parameter is not needed.

  • --title*: Title of the new document

  • --description: Description of the new document

  • --status*: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"

  • --content*: Content of the embedded file

  • --perm_read*: Groups IDs that will have the permission READ separated with comma

  • --perm_write*: Groups IDs that will have the permission WRITE separated with comma

  • --perm_manage*: Groups IDs that will have the permission MANAGE separated with comma

  • --perm_none*: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)

  • --properties*: File that contains the properties to apply to the item

  • --obsolescence_date*: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)

  • --ordering: place where the new document will be hosted. Available values are "begin" and "end"

[terzino@linux tuleap-cli]$ ./tuleap.php docman createEmbeddedFile --project=myproject --parent_id=110418 --title="EmbeddedFile sample" --content="It is just a sample to describe how  we add an embedde file to the docman manager"
+--------+
| Result |
+--------+
| 110499 |
+--------+
                        

Example 45. createEmbeddedFile command

3.4.4 createFile

Big file support: CLI is able to upload files bigger than 2GB when both CLI and remote server are running on top of 64 bits machines.

createFile: Add a document file to the document manager

  • --parent_id*: ID of the parent the file will be created in

  • --project*:Name of the project the item belongs to. If you specified the name of the working project when you logged in, this parameter is not needed.

  • --title*: Title of the new document

  • --description: Description of the new document

  • --status*: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"

  • --content*: Content of the file "local file location"

  • --perm_read*: Groups IDs that will have the permission READ separated with comma

  • --perm_write*: Groups IDs that will have the permission WRITE separated with comma

  • --perm_manage*: Groups IDs that will have the permission MANAGE separated with comma

  • --perm_none*: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)

  • --properties*: File that contains the properties to apply to the item

  • --obsolescence_date*: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)

  • --ordering: place where the new document will be hosted. Available values are "begin" and "end"

[terzino@linux tuleap-cli]$ ./tuleap.php docman createFile --project=myproject --parent_id=110418 --title="CLi user guide" --content="cli_user_guide.pdf"
Sending file (100%)
File uploaded successfully
+--------+
| Result |
+--------+
| 110498 |
+--------+
                        

Example 46. createFile command

3.4.5 createEmptyDocument

createEmptyDocument: Add an empty document to the document manager

  • --parent_id*: ID of the parent the file will be created in

  • --project:Name of the project the item belongs to. If you specified the name of the working project when you logged in, this parameter is not needed.

  • --title*: Title of the new document

  • --description: Description of the new document

  • --status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"

  • --perm_read: Groups IDs that will have the permission READ separated with comma

  • --perm_write: Groups IDs that will have the permission WRITE separated with comma

  • --perm_manage: Groups IDs that will have the permission MANAGE separated with comma

  • --perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)

  • --properties: File that contains the properties to apply to the item

  • --obsolescence_date: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)

  • --ordering: place where the new document will be hosted. Available values are "begin" and "end"

[terzino@linux tuleap-cli]$ ./tuleap.php docman createEmptyDocument --project=myproject --parent_id=110418 --title="user guide help" 
+--------+
| Result |
+--------+
| 110500 |
+--------+
                        

Example 47. createEmptyDocument command

3.4.6 createLink

createLink: Add a document link to the document manager

  • --parent_id*: ID of the parent the file will be created in

  • --project*:Name of the project the item belongs to. If you specified the name of the working project when you logged in, this parameter is not needed.

  • --title*: Title of the new document

  • --content*: Url of the link

  • --description: Description of the new document

  • --status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"

  • --perm_read: Groups IDs that will have the permission READ separated with comma

  • --perm_write: Groups IDs that will have the permission WRITE separated with comma

  • --perm_manage: Groups IDs that will have the permission MANAGE separated with comma

  • --perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)

  • --properties: File that contains the properties to apply to the item

  • --obsolescence_date: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)

  • --ordering: place where the new document will be hosted. Available values are "begin" and "end"

[terzino@linux tuleap-cli]$ ./tuleap.php docman createLink --project=myproject --parent_id=110418 --title="user guide link" --content="codendi.org"
+--------+
| Result |
+--------+
| 110501 |
+--------+

                        

Example 48. createLink command

3.4.7 createWikiPage

createWikiPage: Add a wiki document to the document manager

  • --parent_id*: ID of the parent the file will be created in

  • --title*: Title of the new document

  • --content*: Name of the wiki page

  • --project:Name of the project the item belongs to. If you specified the name of the working project when you logged in, this parameter is not needed.

  • --description: Description of the new document

  • --status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"

  • --perm_read: Groups IDs that will have the permission READ separated with comma

  • --perm_write: Groups IDs that will have the permission WRITE separated with comma

  • --perm_manage: Groups IDs that will have the permission MANAGE separated with comma

  • --perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)

  • --properties: File that contains the properties to apply to the item

  • --obsolescence_date: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)

  • --ordering: place where the new document will be hosted. Available values are "begin" and "end"

[terzino@linux tuleap-cli]$ ./tuleap.php docman createWikiPage --project=myproject --parent_id=110418 --title="user guide wiki" --content="user_guide_wiki"
+--------+
| Result |
+--------+
| 110502 |
+--------+
                        

Example 49. createWikiPage command

3.4.8 createFolder

createFolder: Add a folder to the document manager

  • --parent_id*: ID of the parent the folder will be created in

  • --title*: Title of the new folder

  • --description: Description of the new folder

  • --ordering: place where the new folder will be hosted. Available values are "begin" and "end"

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

  • --status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"

  • --perm_read: Groups IDs that will have the permission READ separated with comma

  • --perm_write: Groups IDs that will have the permission WRITE separated with comma

  • --perm_manage: Groups IDs that will have the permission MANAGE separated with comma

  • --perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)

  • --properties: File that contains the properties to apply to the item

[terzino@linux tuleap-cli]$ ./tuleap.php docman createFolder --project=myproject --parent_id=110418 --title="Tech docs folder"
+--------+
| Result |
+--------+
| 110503 |
+--------+
                        

Example 50. createFolder command

3.4.9 getFile

getFile: Get an item (File/Embedded file)

  • --id*: ID of the item to download

  • --output: Name of the file to write the file to

  • --remote_name: Use the name retrieved from the server instead of using --output

  • --version: The version number that we want to download, if not specified the current one

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[terzino@linux tuleap-cli]$ ./tuleap.php docman getFile --project=myproject --id=110493 --version_number=1 --output=document_cli.doc
File retrieved successfully.
                        

Example 51. getFile command

3.4.10 delete

delete: Delete an item

  • --id*: ID of the item to delete

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[terzino@linux tuleap-cli]$ ./tuleap.php docman delete --project=myproject --id=110502
+--------+
| Result |
+--------+
| 1      |
+--------+
                        

Example 52. delete command

3.4.11 monitor

monitor: Monitor an item

  • --id*: ID of the item to monitor

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[terzino@linux tuleap-cli]$ ./tuleap.php docman monitor --project=myproject --id=110501
+--------+
| Result |
+--------+
| 1      |
+--------+

                        

Example 53. monitor command

3.4.12 move

move: Move an item

  • --id*: ID of the item to move

  • --parent*: ID of the folder the item will be moved in

  • --project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.

[terzino@linux tuleap-cli]$ ./tuleap.php docman move --project=myproject --id=110501 --parent=110503
+--------+
| Result |
+--------+
| 1      |
+--------+

                        

Example 54. move command


Copyright © Xerox Corporation, Codendi Team, 2001-2006. All Rights Reserved