pub struct IssueCmdParams {
pub project_key: Option<String>,
pub issue_key: Option<String>,
pub issue_fields: Option<HashMap<String, Value>>,
pub transition: Option<String>,
pub assignee: Option<String>,
pub query: Option<String>,
}Expand description
Issue command parameters
§Fields
project_key- Jira project keyissue_key- Jira issue keyissue_fields- Jira issue fieldstransition- Jira issue transitionassignee- Jira issue assigneequery- Jira issue query
Fields§
§project_key: Option<String>Jira project key
issue_key: Option<String>Jira issue key
issue_fields: Option<HashMap<String, Value>>Jira issue fields
transition: Option<String>Jira issue transition
assignee: Option<String>Jira issue assignee
query: Option<String>Jira issue query
Implementations§
Source§impl IssueCmdParams
Implementation of IssueCmdParams struct
impl IssueCmdParams
Implementation of IssueCmdParams struct
§Methods
new- Creates a new IssueCmdParams instance
Sourcepub fn new() -> IssueCmdParams
pub fn new() -> IssueCmdParams
Trait Implementations§
Source§impl Default for IssueCmdParams
Default implementation for IssueCmdParams struct
impl Default for IssueCmdParams
Default implementation for IssueCmdParams struct
Source§fn default() -> Self
fn default() -> Self
Creates a default IssueCmdParams instance
§Returns
A IssueCmdParams instance with default values
§Examples
use jirust_cli::runners::jira_cmd_runners::issue_cmd_runner::IssueCmdParams;
let params = IssueCmdParams::default();
assert_eq!(params.project_key, Some("".to_string()));
assert_eq!(params.issue_key, None);
assert_eq!(params.issue_fields, None);
assert_eq!(params.transition, None);
assert_eq!(params.assignee, None);Source§impl From<&IssueArgs> for IssueCmdParams
Implementation of From trait for IssueCmdParams struct
to convert IssueArgs struct to IssueCmdParams struct
impl From<&IssueArgs> for IssueCmdParams
Implementation of From trait for IssueCmdParams struct to convert IssueArgs struct to IssueCmdParams struct
Source§fn from(value: &IssueArgs) -> Self
fn from(value: &IssueArgs) -> Self
Converts IssueArgs struct to IssueCmdParams struct to create a new IssueCmdParams instance
§Arguments
value- IssueArgs struct
§Returns
IssueCmdParams- Issue command parameters
§Examples
use jirust_cli::runners::jira_cmd_runners::issue_cmd_runner::IssueCmdParams;
use jirust_cli::args::commands::{IssueArgs, PaginationArgs, OutputArgs, IssueActionValues};
use std::collections::HashMap;
use serde_json::Value;
let issue_args = IssueArgs {
issue_act: IssueActionValues::Get,
project_key: Some("project_key".to_string()),
issue_key: Some("issue_key".to_string()),
issue_fields: Some(vec![("key".to_string(), r#"{ "key": "value" }"#.to_string())]),
transition_to: Some("transition_to".to_string()),
assignee: Some("assignee".to_string()),
query: None,
pagination: PaginationArgs { page_size: Some(20), page_offset: None },
output: OutputArgs { output_format: None, output_type: None },
};
let params = IssueCmdParams::from(&issue_args);
assert_eq!(params.project_key, Some("project_key".to_string()));
assert_eq!(params.issue_key.unwrap(), "issue_key".to_string());
assert_eq!(params.transition.unwrap(), "transition_to".to_string());
assert_eq!(params.assignee.unwrap(), "assignee".to_string());Auto Trait Implementations§
impl Freeze for IssueCmdParams
impl RefUnwindSafe for IssueCmdParams
impl Send for IssueCmdParams
impl Sync for IssueCmdParams
impl Unpin for IssueCmdParams
impl UnwindSafe for IssueCmdParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more