add sub issue done

This commit is contained in:
zhijie 2013-07-24 11:33:55 +08:00
parent d8c01cef28
commit d58b8f73ed
2 changed files with 23 additions and 3 deletions

View File

@ -172,10 +172,11 @@
issueData.status = _currentStatus; issueData.status = _currentStatus;
issueData.priority = _currentPriority; issueData.priority = _currentPriority;
issueData.assignedTo = _currentUser; issueData.assignedTo = _currentUser;
issueData.projectId = _parentProject.index;
if (_parentIssue) { if (_parentIssue) {
issueData.parentIssueId = _parentIssue.index; issueData.parentIssueId = _parentIssue.index;
issueData.projectId = _parentIssue.projectId;
}else {
issueData.projectId = _parentProject.index;
} }
issueData.description = _descriptionTextview.text; issueData.description = _descriptionTextview.text;
issueData.startDate = _startDateLabel.text; issueData.startDate = _startDateLabel.text;
@ -315,6 +316,20 @@
[self.tableView reloadData]; [self.tableView reloadData];
} }
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
if (section == 0) {
NSString* tip ;
if (_parentIssue) {
tip = [NSString stringWithFormat:@"Add sub issue to #%d",_parentIssue.index];
}else {
tip = [NSString stringWithFormat:@"Add issue to project:%@",_parentProject.name];
}
return tip;
}
return @"";
}
#pragma mark - #pragma mark -
#pragma mark delegate of textfield inputview #pragma mark delegate of textfield inputview

View File

@ -30,6 +30,7 @@
#import "OZLIssueHistoryViewController.h" #import "OZLIssueHistoryViewController.h"
#import "OZLIssueLogtimeViewController.h" #import "OZLIssueLogtimeViewController.h"
#import "OZLSingleton.h" #import "OZLSingleton.h"
#import "OZLIssueCreateViewController.h"
@interface OZLIssueDetailViewController () @interface OZLIssueDetailViewController ()
@ -92,7 +93,11 @@
[self.navigationController pushViewController:history animated:YES]; [self.navigationController pushViewController:history animated:YES];
}break; }break;
case 1:{// add sub task case 1:{// add sub task
UIStoryboard *tableViewStoryboard = [UIStoryboard storyboardWithName:@"OZLIssueCreateViewController" bundle:nil];
OZLIssueCreateViewController* creator = [tableViewStoryboard instantiateViewControllerWithIdentifier:@"OZLIssueCreateViewController"];
[creator setParentIssue:_issueData];
//[self.navigationController presentModalViewController:creator animated:YES];
[self.navigationController pushViewController:creator animated:YES];
}break; }break;
case 2:{//logtime case 2:{//logtime
UIStoryboard *tableViewStoryboard = [UIStoryboard storyboardWithName:@"OZLIssueLogtimeViewController" bundle:nil]; UIStoryboard *tableViewStoryboard = [UIStoryboard storyboardWithName:@"OZLIssueLogtimeViewController" bundle:nil];