In Razor 4.3e, we added the following new example scripts to
$RAZOR_HOME/examples:
- set_child_issue
- validate_parent_child
While the scripts are currently unsupported, industrious users may be interested in their basic implementation. The foundation of the parent/child issue functionality relies upon scripts to do the brunt of the work. In order to take advantage of this capability, you will have to write some scripts.
Here are the basics:
1) Create an Objects directory under the
$RAZOR_UNIVERSE_DIR/DOMAIN_01/++ISSUES++ folder
2) Add a new 8 character text field to the Attributes file of the ++ISSUES++ group. This field will be used for the parent issue's number. The example below shows Parent_Issue for a field name but you can choose whatever you like.
TEXT_FIELD Parent_Issue 8
3) Attach a custom script to the modify.apply "before" trigger in the Actions file that does the following:
- Checks to see if there is a value in the Parent_Issue field.
- If an issue number is found the custom script will: validate the issue number entry to insure that it points to a valid and "open" issue (you decide the valid state names).
- Verify that if the current issue is being closed there does not exist a child issue that is still open.
4) Attach a custom script to the modify.apply "after" trigger in the Actions file that does the following:
- Checks to see if the value in the Parent_Issue field has changed.
- If Parent_Issue changed, it updates the Objects file by the same name as the issue number with the value of the current issue (it is the child issue).
The entry in the Objects file should be: Child I...-.10
- If the old value was a valid issue number, that Objects file will need to be updated to exclude the current child issue number.
5) In order to provide a little more information, you could add the issue state and/or the issue title to the Objects file for the child issue. The entry in the Objects file would look like this:
Child I...-.10 OPEN This issue was written to correct the problem with the GUI found during testing
NOTE: Please keep in mind that scripts located in $RAZOR_HOME/examples are typically NOT supported by Razor Technical Support. They are supplied as is and should serve as a springboard to aid in your personal Razor scripting needs.
[return to top] |