Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

This script is completely out of date and is no longer relevant. This script It predates the existence of the HTTP routines which allow SIL to make REST calls directly.

Also, now the portfolio parent field is directly supported.

We are leaving this article in place as a reference.

...

Code Block
curl -X POST -u admin:admin http://localhost:8080/rest/keplerrominfo/refapp/latest/async-script/runScript \
  -H 'Content-Type: application/json' \
  -d '{"source":{
        "type": "FILE",
        "code": "updateCustomField.sil"
    },
   "properties": [{
        "key": "sil.issue.key",
        "value": "TP-123"
    }],
   "args": ["customfield_12345", "PORT-456"]}'

To customize this curl script you need to do the following:

...

adapt the provided Curl script, follow these steps:

  1. Update the username and password with a valid user account. This is set in at the beginning after beginning after the -u parameter.

  2. Update the Jira base URL. The address format is <youris <your_base_url>/rest/keplerrominfo/refapp/latest/async-script/runScript.

  3. Make sure Ensure the name and path of the script are correct. This is set in the "code" field in the JSON data. In this the provided example, the script is called named "updateCustomField.sil.".

  4. Update the key of the issue that will be updated. This is set in the "value" field in the JSON data. In this the provided example, the script issue key is called "TP-123.".

  5. Update the custom field ID of the Parent Link field or the name of the SIL alias was if previously set up previously. This is passed in the "args" field array in the JSON data. In this the provided example, the ID is "customfield_12345.".

  6. Update the key that to which the issue should be linked to (the parent). This is the second value in the args array. In this the provided example, the parent link is is "PORT-456.".