create issue functionality done, not with parameter exception checked yet

This commit is contained in:
lizj0505 2013-07-18 19:59:24 +08:00
parent 74442af421
commit 00775b4235
15 changed files with 674 additions and 123 deletions

View File

@ -36,7 +36,7 @@
2BCF881E1793F3C8006FC859 /* OZLModelIssue.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF881D1793F3C8006FC859 /* OZLModelIssue.m */; };
2BCF88211793F478006FC859 /* OZLModelTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88201793F478006FC859 /* OZLModelTracker.m */; };
2BCF88271793F4AA006FC859 /* OZLModelIssueStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88261793F4AA006FC859 /* OZLModelIssueStatus.m */; };
2BCF882A1793F4C9006FC859 /* OZLModelPriority.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88291793F4C9006FC859 /* OZLModelPriority.m */; };
2BCF882A1793F4C9006FC859 /* OZLModelIssuePriority.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88291793F4C9006FC859 /* OZLModelIssuePriority.m */; };
2BCF88301793F5CE006FC859 /* OZLModelUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF882F1793F5CE006FC859 /* OZLModelUser.m */; };
D5DB805A1792F2BF0081662A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5DB80591792F2BF0081662A /* UIKit.framework */; };
D5DB805C1792F2BF0081662A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5DB805B1792F2BF0081662A /* Foundation.framework */; };
@ -115,8 +115,8 @@
2BCF88201793F478006FC859 /* OZLModelTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelTracker.m; path = Models/OZLModelTracker.m; sourceTree = "<group>"; };
2BCF88251793F4AA006FC859 /* OZLModelIssueStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelIssueStatus.h; path = Models/OZLModelIssueStatus.h; sourceTree = "<group>"; };
2BCF88261793F4AA006FC859 /* OZLModelIssueStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelIssueStatus.m; path = Models/OZLModelIssueStatus.m; sourceTree = "<group>"; };
2BCF88281793F4C9006FC859 /* OZLModelPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelPriority.h; path = Models/OZLModelPriority.h; sourceTree = "<group>"; };
2BCF88291793F4C9006FC859 /* OZLModelPriority.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelPriority.m; path = Models/OZLModelPriority.m; sourceTree = "<group>"; };
2BCF88281793F4C9006FC859 /* OZLModelIssuePriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelIssuePriority.h; path = Models/OZLModelIssuePriority.h; sourceTree = "<group>"; };
2BCF88291793F4C9006FC859 /* OZLModelIssuePriority.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelIssuePriority.m; path = Models/OZLModelIssuePriority.m; sourceTree = "<group>"; };
2BCF882E1793F5CE006FC859 /* OZLModelUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelUser.h; path = Models/OZLModelUser.h; sourceTree = "<group>"; };
2BCF882F1793F5CE006FC859 /* OZLModelUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelUser.m; path = Models/OZLModelUser.m; sourceTree = "<group>"; };
D5DB80561792F2BF0081662A /* RedmineMobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RedmineMobile.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -446,8 +446,8 @@
2BCF881D1793F3C8006FC859 /* OZLModelIssue.m */,
2BCF881F1793F478006FC859 /* OZLModelTracker.h */,
2BCF88201793F478006FC859 /* OZLModelTracker.m */,
2BCF88281793F4C9006FC859 /* OZLModelPriority.h */,
2BCF88291793F4C9006FC859 /* OZLModelPriority.m */,
2BCF88281793F4C9006FC859 /* OZLModelIssuePriority.h */,
2BCF88291793F4C9006FC859 /* OZLModelIssuePriority.m */,
2BCF882E1793F5CE006FC859 /* OZLModelUser.h */,
2BCF882F1793F5CE006FC859 /* OZLModelUser.m */,
2B9968A91794F71B0086F115 /* OZLModelIssueCategory.h */,
@ -566,7 +566,7 @@
2BCF881E1793F3C8006FC859 /* OZLModelIssue.m in Sources */,
2BCF88211793F478006FC859 /* OZLModelTracker.m in Sources */,
2BCF88271793F4AA006FC859 /* OZLModelIssueStatus.m in Sources */,
2BCF882A1793F4C9006FC859 /* OZLModelPriority.m in Sources */,
2BCF882A1793F4C9006FC859 /* OZLModelIssuePriority.m in Sources */,
2BCF88301793F5CE006FC859 /* OZLModelUser.m in Sources */,
2B9968AB1794F71B0086F115 /* OZLModelIssueCategory.m in Sources */,
2B9968AF1794FC0A0086F115 /* OZLProjectCreateViewController.m in Sources */,

View File

@ -10,7 +10,7 @@
#import "OZLModelTracker.h"
#import "OZLModelIssueStatus.h"
#import "OZLModelUser.h"
#import "OZLModelPriority.h"
#import "OZLModelIssuePriority.h"
#import "OZLModelIssueCategory.h"
@interface OZLModelIssue : NSObject
@ -21,7 +21,7 @@
@property(nonatomic,strong) OZLModelTracker* tracker;
@property(nonatomic,strong) OZLModelUser* author;
@property(nonatomic,strong) OZLModelUser* assignedTo;
@property(nonatomic,strong) OZLModelPriority* priority;
@property(nonatomic,strong) OZLModelIssuePriority* priority;
@property(nonatomic,strong) OZLModelIssueStatus* status;
@property(nonatomic,strong) OZLModelIssueCategory* category;
@property(nonatomic,strong) NSString* subject;
@ -32,6 +32,7 @@
@property(nonatomic,strong) NSString* updatedOn;
@property(nonatomic) float doneRatio;
@property(nonatomic) float spentHours;
@property(nonatomic) float estimatedHours;
@property(nonatomic,strong) NSString* notes;// used as paramter to update a issue
-(id)initWithDictionary:(NSDictionary*)dic;

View File

@ -38,7 +38,7 @@
}
id priority = [dic objectForKey:@"priority"];
if (priority != nil) {
_priority = [[OZLModelPriority alloc] initWithDictionary:priority];
_priority = [[OZLModelIssuePriority alloc] initWithDictionary:priority];
}
id status = [dic objectForKey:@"status"];
if (status) {
@ -61,6 +61,13 @@
}else {
_spentHours = 0.0f;
}
id estimatedHours = [dic objectForKey:@"estimated_hours"];
if (spentHours ) {
_estimatedHours = [estimatedHours floatValue];
}else {
_estimatedHours = 0.0f;
}
return self;
}
-(NSMutableDictionary*) toParametersDic
@ -93,6 +100,12 @@
if (_parentIssueId > 0) {
[issueData setObject:[NSNumber numberWithInt:_parentIssueId] forKey:@"parent_issue_id"];
}
if (_spentHours > 0) {
[issueData setObject:[NSNumber numberWithFloat:_spentHours] forKey:@"spent_hours"];
}
if (_estimatedHours > 0) {
[issueData setObject:[NSNumber numberWithFloat:_estimatedHours] forKey:@"estimated_hours"];
}
return [[NSMutableDictionary alloc] initWithObjectsAndKeys:issueData,@"issue",nil];
}

View File

@ -1,5 +1,5 @@
//
// OZLModelPriority.h
// OZLModelIssuePriority.h
// RedmineMobile
//
// Created by lizhijie on 7/15/13.
@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
@interface OZLModelPriority : NSObject
@interface OZLModelIssuePriority : NSObject
@property(nonatomic) int index;
@property(nonatomic, strong) NSString* name;

View File

@ -1,14 +1,14 @@
//
// OZLModelPriority.m
// OZLModelIssuePriority.m
// RedmineMobile
//
// Created by lizhijie on 7/15/13.
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
//
#import "OZLModelPriority.h"
#import "OZLModelIssuePriority.h"
@implementation OZLModelPriority
@implementation OZLModelIssuePriority
-(id)initWithDictionary:(NSDictionary*)dic
{

View File

@ -11,6 +11,13 @@
@interface OZLModelUser : NSObject
@property(nonatomic) int index;
@property(nonatomic, strong) NSString* login;
@property(nonatomic, strong) NSString* firstname;
@property(nonatomic, strong) NSString* lastname;
@property(nonatomic, strong) NSString* mail;
@property(nonatomic, strong) NSString* createdOn;
@property(nonatomic, strong) NSString* lastLoginIn;
@property(nonatomic, strong) NSString* name;
-(id)initWithDictionary:(NSDictionary*)dic;

View File

@ -18,9 +18,16 @@
}
_index = [[dic objectForKey:@"id"] intValue];
_name = [dic objectForKey:@"name"];
_login = [dic objectForKey:@"login"];
_firstname = [dic objectForKey:@"firstname"];
_lastname = [dic objectForKey:@"lastname"];
_mail = [dic objectForKey:@"mail"];
_createdOn = [dic objectForKey:@"created_on"];
_lastLoginIn = [dic objectForKey:@"last_login_on"];
_name = _login;
return self;
}
@end

View File

@ -29,7 +29,7 @@
#import <Foundation/Foundation.h>
#import "OZLModelProject.h"
#import "OZLModelIssue.h"
#import "OZLModelPriority.h"
#import "OZLModelIssuePriority.h"
#import "OZLModelIssueStatus.h"
#import "OZLModelTracker.h"
#import "OZLModelUser.h"
@ -51,5 +51,14 @@
+(void)updateIssue:(OZLModelIssue*)issueData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
+(void)deleteIssue:(int)issueid withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
// priority
+(void)getPriorityListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
// user
+(void)getUserListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
// issue status
+(void)getIssueStatusListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
// tracker
+(void)getTrackerListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
@end

View File

@ -267,8 +267,7 @@
if (block) {
NSLog(@"the repsonse:%@",responseObject);
int repondNumber = [responseObject intValue];
block(repondNumber == 201,nil);
block(YES,nil);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
@ -336,4 +335,141 @@
}];
}
#pragma mark -
#pragma mark priority api
// priority
+(void)getPriorityListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block
{
NSString* path = @"/enumerations/issue_priorities.json";
NSMutableDictionary* paramsDic = [[NSMutableDictionary alloc] initWithDictionary:params];
NSString* accessKey = [[OZLSingleton sharedInstance] redmineUserKey];
if (accessKey.length > 0) {
[paramsDic setObject:accessKey forKey:@"key"];
}
[[OZLNetworkBase sharedClient] setAuthorizationHeader];
[[OZLNetworkBase sharedClient] getPath:path parameters:paramsDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
if (block) {
NSLog(@"the repsonse:%@",responseObject);
NSMutableArray* priorities = [[NSMutableArray alloc] init];
NSArray* dic = [responseObject objectForKey:@"issue_priorities"];
for (NSDictionary* p in dic) {
[priorities addObject:[[OZLModelIssuePriority alloc] initWithDictionary:p]];
}
block(priorities,nil);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
if (block) {
block([NSArray array], error);
}
}];
}
#pragma mark -
#pragma mark user api
// user
+(void)getUserListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block
{
NSString* path = @"/users.json";
NSMutableDictionary* paramsDic = [[NSMutableDictionary alloc] initWithDictionary:params];
NSString* accessKey = [[OZLSingleton sharedInstance] redmineUserKey];
if (accessKey.length > 0) {
[paramsDic setObject:accessKey forKey:@"key"];
}
[[OZLNetworkBase sharedClient] setAuthorizationHeader];
[[OZLNetworkBase sharedClient] getPath:path parameters:paramsDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
if (block) {
NSLog(@"the repsonse:%@",responseObject);
NSMutableArray* priorities = [[NSMutableArray alloc] init];
NSArray* dic = [responseObject objectForKey:@"users"];
for (NSDictionary* p in dic) {
[priorities addObject:[[OZLModelUser alloc] initWithDictionary:p]];
}
block(priorities,nil);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
if (block) {
block([NSArray array], error);
}
}];
}
#pragma mark -
#pragma mark issue status api
// issue status
+(void)getIssueStatusListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block
{
NSString* path = @"/issue_statuses.json";
NSMutableDictionary* paramsDic = [[NSMutableDictionary alloc] initWithDictionary:params];
NSString* accessKey = [[OZLSingleton sharedInstance] redmineUserKey];
if (accessKey.length > 0) {
[paramsDic setObject:accessKey forKey:@"key"];
}
[[OZLNetworkBase sharedClient] setAuthorizationHeader];
[[OZLNetworkBase sharedClient] getPath:path parameters:paramsDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
if (block) {
NSLog(@"the repsonse:%@",responseObject);
NSMutableArray* priorities = [[NSMutableArray alloc] init];
NSArray* dic = [responseObject objectForKey:@"issue_statuses"];
for (NSDictionary* p in dic) {
[priorities addObject:[[OZLModelIssueStatus alloc] initWithDictionary:p]];
}
block(priorities,nil);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
if (block) {
block([NSArray array], error);
}
}];
}
#pragma mark -
#pragma mark tracker api
// tracker
+(void)getTrackerListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block
{
NSString* path = @"/trackers.json";
NSMutableDictionary* paramsDic = [[NSMutableDictionary alloc] initWithDictionary:params];
NSString* accessKey = [[OZLSingleton sharedInstance] redmineUserKey];
if (accessKey.length > 0) {
[paramsDic setObject:accessKey forKey:@"key"];
}
[[OZLNetworkBase sharedClient] setAuthorizationHeader];
[[OZLNetworkBase sharedClient] getPath:path parameters:paramsDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
if (block) {
NSLog(@"the repsonse:%@",responseObject);
NSMutableArray* priorities = [[NSMutableArray alloc] init];
NSArray* dic = [responseObject objectForKey:@"trackers"];
for (NSDictionary* p in dic) {
[priorities addObject:[[OZLModelTracker alloc] initWithDictionary:p]];
}
block(priorities,nil);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
if (block) {
block([NSArray array], error);
}
}];
}
@end

View File

@ -7,9 +7,27 @@
//
#import <UIKit/UIKit.h>
#import "OZLModelIssue.h"
#import "OZLModelProject.h"
@interface OZLIssueCreateViewController : UITableViewController
@interface OZLIssueCreateViewController : UITableViewController<UITextFieldDelegate,UIPickerViewDataSource,UIPickerViewDelegate>
- (IBAction)onCancel:(id)sender;
- (IBAction)onSave:(id)sender;
// neccessory
@property (weak, nonatomic) IBOutlet UITextField *subjectTextField;
@property (weak, nonatomic) IBOutlet UILabel *trackerLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
@property (weak, nonatomic) IBOutlet UILabel *priorityLabel;
// optional
@property (weak, nonatomic) IBOutlet UILabel *assigneeLabel;
@property (weak, nonatomic) IBOutlet UITextField *startDateLabel;
@property (weak, nonatomic) IBOutlet UITextField *dueDateLabel;
@property (weak, nonatomic) IBOutlet UITextField *estimatedHoursLabel;
@property (weak, nonatomic) IBOutlet UITextField *doneProgressLabel;
@property (weak, nonatomic) IBOutlet UITextView *descriptionTextview;
@property(nonatomic,strong) OZLModelProject* parentProject;
@property(nonatomic,strong) OZLModelIssue* parentIssue;
@property(nonatomic,strong) NSArray* issueList;
@end

View File

@ -7,8 +7,31 @@
//
#import "OZLIssueCreateViewController.h"
#import "OZLNetwork.h"
#import "MBProgressHUD.h"
#import "OZLModelIssuePriority.h"
#import "OZLModelTracker.h"
#import "OZLModelUser.h"
#import "OZLModelIssueStatus.h"
#import "MLTableAlert.h"
@interface OZLIssueCreateViewController ()
@interface OZLIssueCreateViewController () {
NSArray* _trackerList;
NSArray* _priorityList;
NSArray* _statusList;
NSArray* _userList;
OZLModelTracker* _currentTracker;
OZLModelIssuePriority* _currentPriority;
OZLModelIssueStatus* _currentStatus;
OZLModelUser* _currentUser;
NSDate* _currentStartDate;
NSDate* _currentDueDate;
int _currentEstimatedTime;//minutes
MBProgressHUD* _HUD;
}
@end
@ -32,6 +55,103 @@
UIBarButtonItem* saveBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSave:)];
[self.navigationItem setRightBarButtonItem:saveBtn];
[self setupInputviews];
// hud
_HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:_HUD];
_HUD.labelText = @"Loading...";
[self loadIssueRelatedData];
}
-(void) setupInputviews
{
// setup datapicker inputview
UIDatePicker* datePicker = [[UIDatePicker alloc]init];
[datePicker setDatePickerMode:UIDatePickerModeDate];
[datePicker addTarget:self action:@selector(datePickerValueChanged:) forControlEvents:UIControlEventValueChanged];
// accessoryview
UIToolbar* inputAccessoryView = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 40)];
UIBarButtonItem* accessoryDoneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(accessoryDoneClicked:)];
UIBarButtonItem* flexleft = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
inputAccessoryView.items = [NSArray arrayWithObjects:flexleft, accessoryDoneButton, nil];;
_startDateLabel.inputView = datePicker;
_startDateLabel.inputAccessoryView = inputAccessoryView;
_startDateLabel.delegate = self;
_dueDateLabel.inputView = datePicker;
_dueDateLabel.inputAccessoryView = inputAccessoryView;
_dueDateLabel.delegate = self;
// setup time picker inputview
UIDatePicker* timerPicker = [[UIDatePicker alloc]init];
[timerPicker setDatePickerMode:UIDatePickerModeCountDownTimer];
[timerPicker addTarget:self action:@selector(datePickerValueChanged:) forControlEvents:UIControlEventValueChanged];
timerPicker.minuteInterval = 5;
_estimatedHoursLabel.inputView = timerPicker;
_estimatedHoursLabel.inputAccessoryView = inputAccessoryView;
_estimatedHoursLabel.delegate = self;
// setup percentage pickerview
UIPickerView* percentageView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 0, 320, 162)];
percentageView.dataSource = self;
percentageView.delegate = self;
[percentageView selectRow:0 inComponent:0 animated:NO];
_doneProgressLabel.inputView = percentageView;
_doneProgressLabel.inputAccessoryView = inputAccessoryView;
_doneProgressLabel.delegate = self;
}
-(void)loadIssueRelatedData
{
static int doneCount = 0;
[_HUD show:YES];
[OZLNetwork getTrackerListWithParams:nil andBlock:^(NSArray *result, NSError *error) {
if (!error) {
_trackerList = result;
}else {
NSLog(@"get tracker list error : %@",error.description);
}
doneCount ++;
if (doneCount == 4) {
[_HUD hide:YES];
}
}];
[OZLNetwork getIssueStatusListWithParams:nil andBlock:^(NSArray *result, NSError *error) {
if (!error) {
_statusList = result;
}else {
NSLog(@"get issue status list error : %@",error.description);
}
doneCount ++;
if (doneCount == 4) {
[_HUD hide:YES];
}
}];
[OZLNetwork getPriorityListWithParams:nil andBlock:^(NSArray *result, NSError *error) {
if (!error) {
_priorityList = result;
}else {
NSLog(@"get priority list error : %@",error.description);
}
doneCount ++;
if (doneCount == 4) {
[_HUD hide:YES];
}
}];
[OZLNetwork getUserListWithParams:nil andBlock:^(NSArray *result, NSError *error) {
if (!error) {
_userList = result;
}else {
NSLog(@"get user list error : %@",error.description);
}
doneCount ++;
if (doneCount == 4) {
[_HUD hide:YES];
}
}];
}
- (void)didReceiveMemoryWarning
@ -45,5 +165,237 @@
}
- (IBAction)onSave:(id)sender {
if (_subjectTextField.text.length == 0) {
_HUD.mode = MBProgressHUDModeText;
_HUD.labelText = @"subject can not be empty.";
[_HUD show:YES];
[_HUD hide:YES afterDelay:1];
return;
}
if (_currentUser == nil) {
_HUD.mode = MBProgressHUDModeText;
_HUD.labelText = @"tracker can not be empty.";
[_HUD show:YES];
[_HUD hide:YES afterDelay:1];
return;
}
if (_currentStatus == nil) {
_HUD.mode = MBProgressHUDModeText;
_HUD.labelText = @"status can not be empty.";
[_HUD show:YES];
[_HUD hide:YES afterDelay:1];
return;
}
if (_currentPriority == nil) {
_HUD.mode = MBProgressHUDModeText;
_HUD.labelText = @"priority can not be empty.";
[_HUD show:YES];
[_HUD hide:YES afterDelay:1];
return;
}
OZLModelIssue* issueData = [[OZLModelIssue alloc] init];
issueData.subject = _subjectTextField.text;
issueData.tracker = _currentTracker;
issueData.status = _currentStatus;
issueData.priority = _currentPriority;
issueData.assignedTo = _currentUser;
issueData.projectId = _parentProject.index;
if (_parentIssue) {
issueData.parentIssueId = _parentIssue.index;
}
issueData.description = _descriptionTextview.text;
issueData.startDate = _startDateLabel.text;
issueData.dueDate = _dueDateLabel.text;
issueData.doneRatio = [_doneProgressLabel.text integerValue];
issueData.estimatedHours = _currentEstimatedTime/60.0f;
//TODO: is_public is not processed yet
_HUD.mode = MBProgressHUDModeIndeterminate;
_HUD.labelText = @"Creating Project...";
[_HUD show:YES];
[OZLNetwork createIssue:issueData withParams:nil andBlock:^(BOOL success, NSError *error){
if (error) {
NSLog(@"create project error: %@",error.description);
}else {
}
[_HUD hide:YES];
}];
}
- (void)viewDidUnload {
[self setSubjectTextField:nil];
[self setTrackerLabel:nil];
[self setStatusLabel:nil];
[self setPriorityLabel:nil];
[self setAssigneeLabel:nil];
[self setStartDateLabel:nil];
[self setDueDateLabel:nil];
[self setEstimatedHoursLabel:nil];
[self setDoneProgressLabel:nil];
[self setDescriptionTextview:nil];
[super viewDidUnload];
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSArray* alertTitles = @[@"Select Tracker", @"Select Status", @"Select Priority", @"Select Assignee"];
NSArray* dataArray = @[_trackerList, _statusList, _priorityList, _userList];
if (indexPath.section == 1) {
MLTableAlert* tableAlert = [MLTableAlert tableAlertWithTitle:[alertTitles objectAtIndex:indexPath.row] cancelButtonTitle:@"Cancel" numberOfRows:^NSInteger (NSInteger section)
{
return [[dataArray objectAtIndex:indexPath.row] count] + 1;
}
andCells:^UITableViewCell* (MLTableAlert *anAlert, NSIndexPath *alertIndexPath)
{
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [anAlert.table dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
if (alertIndexPath.row == 0) {
cell.textLabel.text = @"None";
}else {
cell.textLabel.text = [[[dataArray objectAtIndex:indexPath.row ]objectAtIndex:alertIndexPath.row - 1] name];
}
return cell;
}];
// Setting custom alert height
tableAlert.height = 350;
// configure actions to perform
[tableAlert configureSelectionBlock:^(NSIndexPath *selectedIndex){
UITableViewCell* parentCell = [self.tableView cellForRowAtIndexPath:indexPath];
if (selectedIndex.row == 0) {
switch (indexPath.row) {
case 0:{//tracker
_currentTracker = nil;
}break;
case 1:{//status
_currentStatus = nil;
}break;
case 2:{//priority
_currentPriority = nil;
}break;
case 3:{//assignee
_currentUser = nil;
}break;
default:
break;
}
parentCell.detailTextLabel.text = @"None";
}else {
id data = [[dataArray objectAtIndex:indexPath.row ] objectAtIndex:selectedIndex.row - 1];
switch (indexPath.row) {
case 0:{//tracker
_currentUser = data;
}break;
case 1:{//status
_currentStatus = data;
}break;
case 2:{//priority
_currentPriority = data;
}break;
case 3:{//assignee
_currentUser = data;
}break;
default:
break;
}
parentCell.detailTextLabel.text = [data name];
}
[parentCell.detailTextLabel sizeToFit];
} andCompletionBlock:^{
}];
[tableAlert show];
}else if( indexPath.section == 2){
switch (indexPath.row) {
case 0:{//start date
}break;
case 1:{//due date
}break;
case 2:{//estimated hours
}break;
case 3:{//done
}break;
default:
break;
}
}
}
#pragma mark -
#pragma mark delegate of textfield inputview
#pragma mark data picker value changed
-(void)datePickerValueChanged:(id)sender
{
UIDatePicker* datepicker = (UIDatePicker*)sender;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
if (_estimatedHoursLabel.isFirstResponder) {
NSString* timeStr = [NSString stringWithFormat:@"%d Mins",(int)datepicker.countDownDuration/60];
_estimatedHoursLabel.text = timeStr;
_currentEstimatedTime = (int)datepicker.countDownDuration/60;
}else {
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString* dateStr = [dateFormatter stringFromDate:datepicker.date];
if (_startDateLabel.isFirstResponder) {
_startDateLabel.text = dateStr;
_currentStartDate = datepicker.date;
}else if(_dueDateLabel.isFirstResponder) {
_dueDateLabel.text = dateStr;
_currentDueDate = datepicker.date;
}
}
}
-(void)accessoryDoneClicked:(id)sender
{
[self.view endEditing:YES];
}
#pragma mark -
#pragma mark picker view delegate and datasource
- (void)pickerView:(UIPickerView *)pV didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
_doneProgressLabel.text = [NSString stringWithFormat:@"%d %%",row * 10];
}
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
{
return 1;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
return 11;
}
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
return [NSString stringWithFormat:@"%d %%",row * 10];
}
@end

View File

@ -13,10 +13,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection headerTitle="Adding issue to: " id="kwZ-sn-ebZ">
<tableViewSection headerTitle="Adding issue" id="kwZ-sn-ebZ">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="q4d-tB-odA">
<rect key="frame" x="0.0" y="46" width="320" height="45"/>
<rect key="frame" x="0.0" y="46" width="320" height="46"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="300" height="43"/>
@ -32,30 +32,12 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="ZYp-VR-6xb" style="IBUITableViewCellStyleDefault" id="8YQ-52-5vA">
<rect key="frame" x="0.0" y="91" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="280" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Description" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ZYp-VR-6xb">
<rect key="frame" x="10" y="0.0" width="260" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection id="gUc-Fn-oHM">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="6AM-Ns-Deh" detailTextLabel="BJD-cQ-dkJ" style="IBUITableViewCellStyleValue2" id="jPi-X0-tEE">
<rect key="frame" x="0.0" y="156" width="320" height="45"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="6AM-Ns-Deh" detailTextLabel="BJD-cQ-dkJ" style="IBUITableViewCellStyleValue2" id="jPi-X0-tEE">
<rect key="frame" x="0.0" y="112" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="300" height="43"/>
@ -68,7 +50,7 @@
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="BJD-cQ-dkJ">
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="BJD-cQ-dkJ">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -79,8 +61,8 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="O3w-IB-6j2" detailTextLabel="MGP-PP-nKO" style="IBUITableViewCellStyleValue2" id="uGZ-sd-Yhn">
<rect key="frame" x="0.0" y="201" width="320" height="44"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="O3w-IB-6j2" detailTextLabel="MGP-PP-nKO" style="IBUITableViewCellStyleValue2" id="uGZ-sd-Yhn">
<rect key="frame" x="0.0" y="157" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
@ -93,7 +75,7 @@
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MGP-PP-nKO">
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MGP-PP-nKO">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -104,8 +86,8 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="k0t-ln-UOh" detailTextLabel="YdG-5O-vED" style="IBUITableViewCellStyleValue2" id="5bP-lu-Gng">
<rect key="frame" x="0.0" y="245" width="320" height="44"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="k0t-ln-UOh" detailTextLabel="YdG-5O-vED" style="IBUITableViewCellStyleValue2" id="5bP-lu-Gng">
<rect key="frame" x="0.0" y="201" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
@ -118,7 +100,7 @@
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YdG-5O-vED">
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YdG-5O-vED">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -129,8 +111,8 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="4SM-iY-gcb" detailTextLabel="0uC-dr-1gH" style="IBUITableViewCellStyleValue2" id="vfV-cv-ix2">
<rect key="frame" x="0.0" y="289" width="320" height="45"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="4SM-iY-gcb" detailTextLabel="0uC-dr-1gH" style="IBUITableViewCellStyleValue2" id="vfV-cv-ix2">
<rect key="frame" x="0.0" y="245" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
@ -143,7 +125,7 @@
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0uC-dr-1gH">
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0uC-dr-1gH">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -158,102 +140,124 @@
</tableViewSection>
<tableViewSection id="ecN-hJ-yaW">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="2Ga-Qb-twl" detailTextLabel="nMg-gE-9iM" style="IBUITableViewCellStyleValue2" id="dqE-by-NWY">
<rect key="frame" x="0.0" y="354" width="320" height="45"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="dqE-by-NWY">
<rect key="frame" x="0.0" y="310" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="1" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Start Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2Ga-Qb-twl">
<rect key="frame" x="10" y="15" width="67" height="15"/>
<autoresizingMask key="autoresizingMask"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Start Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2A3-cy-Aku">
<rect key="frame" x="11" y="11" width="86" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nMg-gE-9iM">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" id="cLY-jP-ur3">
<rect key="frame" x="93" y="7" width="187" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="bqG-jz-Ng3" detailTextLabel="rbs-VG-2Q3" style="IBUITableViewCellStyleValue2" id="cmF-ef-A0n">
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="cmF-ef-A0n">
<rect key="frame" x="0.0" y="355" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Due Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="COv-Hj-Sr2">
<rect key="frame" x="11" y="11" width="86" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" id="fOP-AJ-wM7">
<rect key="frame" x="93" y="7" width="187" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="b0f-a5-IDN">
<rect key="frame" x="0.0" y="399" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Due Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bqG-jz-Ng3">
<rect key="frame" x="10" y="15" width="67" height="15"/>
<autoresizingMask key="autoresizingMask"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Est. Hours" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ewF-DE-Fu6">
<rect key="frame" x="11" y="11" width="86" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rbs-VG-2Q3">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" id="3r5-6c-djU">
<rect key="frame" x="93" y="7" width="187" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="L8v-xu-0EA" detailTextLabel="oSK-O9-cn7" style="IBUITableViewCellStyleValue2" id="b0f-a5-IDN">
<rect key="frame" x="0.0" y="443" width="320" height="44"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="gray" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="5Bp-75-yl6">
<rect key="frame" x="0.0" y="443" width="320" height="45"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Est. Hours" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="L8v-xu-0EA">
<rect key="frame" x="10" y="15" width="67" height="15"/>
<autoresizingMask key="autoresizingMask"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Done" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CfL-Cj-Lv8">
<rect key="frame" x="11" y="11" width="86" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="oSK-O9-cn7">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" id="z27-XN-YTR">
<rect key="frame" x="93" y="7" width="187" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="g2m-Ig-coG" detailTextLabel="H2R-Bp-ngl" style="IBUITableViewCellStyleValue2" id="5Bp-75-yl6">
<rect key="frame" x="0.0" y="487" width="320" height="45"/>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Description" id="U96-yf-3Mu">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="100" id="u4f-I6-24w">
<rect key="frame" x="0.0" y="534" width="320" height="102"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
<rect key="frame" x="10" y="1" width="300" height="99"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Done" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="g2m-Ig-coG">
<rect key="frame" x="10" y="15" width="67" height="15"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" red="0.32156862745098042" green="0.40000000000000002" blue="0.56862745098039214" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="H2R-Bp-ngl">
<rect key="frame" x="83" y="12" width="41" height="19"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="wtw-cb-hjP">
<rect key="frame" x="9" y="7" width="282" height="85"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
@ -267,21 +271,24 @@
</connections>
</tableView>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
<outlet property="assigneeLabel" destination="0uC-dr-1gH" id="v4b-h8-Isa"/>
<outlet property="descriptionTextview" destination="wtw-cb-hjP" id="C5n-fK-1a5"/>
<outlet property="doneProgressLabel" destination="z27-XN-YTR" id="xFt-R9-4RS"/>
<outlet property="dueDateLabel" destination="fOP-AJ-wM7" id="ebo-gW-H8n"/>
<outlet property="estimatedHoursLabel" destination="3r5-6c-djU" id="27J-Jd-MqV"/>
<outlet property="priorityLabel" destination="YdG-5O-vED" id="iza-iy-TSc"/>
<outlet property="startDateLabel" destination="cLY-jP-ur3" id="d5Z-IF-FsV"/>
<outlet property="statusLabel" destination="MGP-PP-nKO" id="ej3-Rp-Age"/>
<outlet property="subjectTextField" destination="mEf-sR-EAc" id="sD4-bF-Ql0"/>
<outlet property="trackerLabel" destination="BJD-cQ-dkJ" id="FNH-wc-NgC"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="7Hg-N6-PNc" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="196" y="43"/>
</scene>
</scenes>
<classes>
<class className="OZLIssueCreateViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/OZLIssueCreateViewController.h"/>
<relationships>
<relationship kind="action" name="onCancel:"/>
<relationship kind="action" name="onSave:"/>
</relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>

View File

@ -41,8 +41,8 @@
_progressbar.progress = _issueData.doneRatio/100;
_status.text = _issueData.status.name ;
_priority.text = _issueData.priority.name;
_author.text = _issueData.author.name;
_assignedTo.text = _issueData.assignedTo.name;
_author.text = _issueData.author.login;
_assignedTo.text = _issueData.assignedTo.login;
_startTime.text = _issueData.startDate;
_dueTime.text = _issueData.dueDate;
}

View File

@ -112,7 +112,7 @@
// create the alert
MLTableAlert* tableAlert = [MLTableAlert tableAlertWithTitle:@"Parent Project" cancelButtonTitle:@"Cancel" numberOfRows:^NSInteger (NSInteger section)
{
return _projectList.count;
return _projectList.count + 1;
}
andCells:^UITableViewCell* (MLTableAlert *anAlert, NSIndexPath *indexPath)
{

View File

@ -251,7 +251,8 @@
- (IBAction)onNewIssue:(id)sender {
//OZLIssueCreateViewController* creator = [[OZLIssueCreateViewController alloc] initWithNibName:@"OZLIssueCreateViewController" bundle:nil];
UIStoryboard *tableViewStoryboard = [UIStoryboard storyboardWithName:@"OZLIssueCreateViewController" bundle:nil];
OZLIssueDetailViewController* creator = [tableViewStoryboard instantiateViewControllerWithIdentifier:@"OZLIssueCreateViewController"];
OZLIssueCreateViewController* creator = [tableViewStoryboard instantiateViewControllerWithIdentifier:@"OZLIssueCreateViewController"];
[creator setParentProject:_projectData];
//[self.navigationController presentModalViewController:creator animated:YES];
[self.navigationController pushViewController:creator animated:YES];
}