Lines
12.5 %
Functions
4.76 %
Branches
100 %
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct ReviewType {
pub name: String,
pub organization: String,
pub emails: Vec<String>,
}
#[derive(Debug, Serialize, Deserialize, Default, Clone)]
pub struct ReviewRequest {
pub date: DateTime<Utc>,
pub projectname: String,
pub phone: Option<String>,
pub email: String,
pub programme: String,
pub summary: String,
pub www: String,
pub i18n: bool,
pub licensing: bool,
pub testing: bool,
pub community: bool,
pub a11y: bool,
pub packaging: bool,
pub diversity: bool,
pub standards: bool,
pub security: bool,
pub governance: bool,
#[serde(default)]
pub uxtesting: bool,
pub technicalwriting: bool,
pub comments: String,
impl ReviewRequest {
pub fn remove_personal_information(&mut self) {
self.name.clear();
self.email.clear();
self.phone = None;
// these fields are cleared to be on the safe side
self.summary.clear();
self.comments.clear();
fn bool_true() -> bool {
true
pub struct Rejection {
pub creator: String,
pub request: String,
pub review_type: String,
pub rejection_comment: String,
#[serde(default = "bool_true")]
pub send_mail: bool,
pub struct Task {
pub assigned_organization: String,
pub assignment_comment: String,
pub struct Report {
pub task: String,
pub message: String,
pub filename: Option<String>,
pub fileid: Option<String>,
pub rate_euros_per_hour: Option<f32>,
pub time_spent_hours: Option<f32>,