Feature SUBMIT

Description and Priority

The user invokes the tool (typically via yaktrack submit [template]) and is greeted with an interactive tool which takes the given template and invokes the editor listed in the YAKTRACKEDITOR environment variable on the template or, if the variable is not set, presents the user with a series of prompts and menus to fill out the template.

Stimulus/Response Sequences

SUBMIT.UC.EDITOR

Description

The user invokes the tool with the YAKTRACKEDITOR environment variable set to an existing editor command.

Requires

An existing repository

A valid command at the location referenced by the YAKTRACKEDITOR variable, which accepts a filename as the first available argument

Ensures

A filename containing a file ready to be filed using the file tool

Priority

Medium (system should work without an editor, so SUBMIT.UC.NOEDITOR takes priority)

Normal Course

Table 4-15. Normal Course of Events

User ActionsSystem Actions
User invokes tool from command line via yaktrack submit [template-type], with YAKTRACKEDITOR environment variable setCopies the requested template file into a temporary filename
 Invokes the shell to run that editor on a new temporary filename which has had the basic shell of the template filled in, then awaits return
 If error code results, gives feedback for error and suggest clearing the YAKTRACKEDITOR variable to use the no-editor option (see SUBMIT.UC.NOEDITOR).
 If no error code results, files that temporary file using yaktrack file; returns results of that subcommand as feedback.

SUBMIT.UC.NOEDITOR: Submission of an issue without an external editor

Description

The user invokes the tool without the YAKTRACKEDITOR environment variable set. The tool presents a list of prompts and menus to gather information about the issue, then files the report.

Requires

A valid repository

A valid template

The tool is invoked interactively (ie not from one of the gateways)

Ensures

A filed report using the given template

Priority

Very high

Frequency

Very high

Normal course

Table 4-16. Normal Course of Events

User ActionsSystem Actions
User invokes tool without the YAKTRACKEDITOR environment variable setReads the requested template
 Creates a series of prompts and menus from the template
 Polls the user for information, building a completed issue report
 When complete, saves under a temporary filename and files using the file command object

Functional Requirements

SUBMIT.FR1. The system should be able to identify the YAKTRACKEDITOR environment variable and obtain its contents

SUBMIT.FR2. The system should be able to create a temporary directory in a location "under" the given repository (ideally, in the current directory)

SUBMIT.FR3. The system should be able to copy the template file into the temporary directory created by SUBMIT.FR2

SUBMIT.FR4. The system should be able to construct a new report with some sort of basic structure derived from the desired template

SUBMIT.FR5. The system should invoke the desired editor on the temporary structure file created in SUBMIT.FR4

SUBMIT.FR6. If the editor invocation goes poorly (bad exit), the system should provide feedback suggesting they clear the YAKTRACKEDITOR environment variable and use the no-editor feature

SUBMIT.FR7. If the editor invocation goes smoothly (good exit), the system should file the new report using the yaktrack file command

SUBMIT.FR8. After filing, the system should clean up the temporary directory created in SUBMIT.FR2 and all files located beneath it.

SUBMIT.FR9. If no YAKTRACKEDITOR environment variable is present, the system should create a series of prompts and menus to edit issues without an external editor.

SUBMIT.FR10. For enumerated attributes, the system should create an enumerated menu and only allow choices from that menu. A numbered list of choices is acceptable.

SUBMIT.FR11. For text attributes, the system should allow the user to enter a line of text.

SUBMIT.FR12. For text contents (children who have text), the system should allow the user to enter text.

SUBMIT.FR13. During no-editor submissions, the system should show the user "where" in the document they are, by displaying the name of the current element and attribute prior to each menu prompt.

SUBMIT.FR14. During submission of a new issue, default values for attributes should be reflected in the defaults for menus, or in the shell edited by the external editor.