Class: UuDevman::Issue
- Inherits:
-
Object
- Object
- UuDevman::Issue
- Defined in:
- lib/uu_devman/issue_create.rb
Overview
Module Issue
Constant Summary
- SEVERITIES =
Possible severity values.
['A', 'A1', 'A2', 'A3', 'B', 'B1', 'B2', 'B3', 'C', 'C1', 'C2', 'C3']
Class Method Summary (collapse)
-
+ (UU::OS::UESURI) create(module_uri, opts = {})
Create new issue.
Class Method Details
+ (UU::OS::UESURI) create(module_uri, opts = {})
Create new issue.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/uu_devman/issue_create.rb', line 20 def self.create(module_uri, opts = {}) raise UuDevman::ValidationException, "Attribute module_uri must be a valid UU::OS::UESURI or its String representation." unless uesuri?(module_uri) raise UuDevman::ValidationException, "Parameter :name must be set." if opts[:name].nil? || opts[:name].size < 1 raise UuDevman::ValidationException, "Parameter :severity must be set." if opts[:severity].nil? raise UuDevman::ValidationException, "Parameter :text must be set." if opts[:text].nil? || opts[:text].size < 1 raise UuDevman::ValidationException, "Parameter :severity must be one of #{SEVERITIES}." unless SEVERITIES.include?(opts[:severity]) raise UuDevman::ValidationException, "Parameter :rel_art must be UESURI or nil." if !opts[:rel_art].nil? && !uesuri?(opts[:rel_art]) raise UuDevman::ValidationException, "Parameter :rel_req must be UESURI or nil." if !opts[:rel_req].nil? && !uesuri?(opts[:rel_req]) opts[:inform_competent_role] = true if opts[:inform_competent_role].nil? session = UU::OS::Security::Session.current_session @cmd = UU::OS::CMD::CommandClient.new("uu-devman", session, nil) uri = @cmd.invoke("Issue/create", module_uri, parameters: opts) UU::OS::UESURI.new(uri) end |