Managing Tasks and Contexts
When you work on a project, you can organize your work in smaller tasks that you need to complete.
These can be tasks that you set yourself. In AppCode, you can divide a large task into smaller tasks associated with dedicated changelists.
Or these can be tasks coming from your issue tracker. For example, you can work with tasks and bugs assigned to you directly from AppCode. To be able to do so, configure a connection between the IDE and your tracker account first.
Configuring integration with issue trackers
- In the Settings/Preferences dialog (⌘,), go to .
- Click (⌘N), and select the necessary issue tracker from the list.
- Enter connection details. Note that settings may differ depending on your issue tracker.
Normally, you will have to specify the server URL and connection credentials.
Select the Share URL option to allow access to the server for other members of your team.
Click Proxy settings if you want to access the server via a proxy server. You can find more information on proxy settings in the HTTP Proxy section.
(Optional) Enable adding a commit message for a changelist and configure a message template.
For some trackers (for example, for trackers not supported out of the box), you will have to configure server parameters as well. Specify the URLs and the request type for accessing tasks, select a format for a tracker server response – XML for XPath, JSON for JSONPath, or text for regular expressions. You can also use the table of selectors to specify details about tasks you want to get from the server. For example, this can be a date when a task was created or its URL. Note that you can use code completion in this window.
-
(Optionally) Optimize synchronization between AppCode and your issue tracker.
AppCode caches the list of issues loaded from the tracker and updates them repeatedly. You can specify how many issues should be cached and how often AppCode should update information about them. To do so, return to the Tasks window. In the Cache settings section, enter the necessary values.
Working with tasks
In AppCode, there two types of tasks.
Tasks that were loaded to AppCode from your issue tracker. These are tracker tasks Tracker tasks are linked with the corresponding issues in your issue tracker. This allows you to monitor and update them directly from AppCode.
Tasks that were originally created in AppCode. These are local tasks. Local tasks are not related to an issue tracker.
If you have created at least one task of either type, a drop-down list called task combo becomes available on the toolbar.
Pre-configure task settings
- In AppCode, there are some task-related settings that you might want to configure before you start working. In the Settings/Preferences dialog (⌘,), go to .
- Changelist name format — when you open or create a new task, AppCode will prompt you to create a new changelist associated with this task. In this field, you can specify a template that will be used for generating names for new changelists. Use the
{id}
,{summary}
,{number}
,{project}
placeholders. - Feature branch name format — when you create or open a new task, AppCode will prompt you to create a new feature branch. In this field, you can configure a template for generating names for new feature branches. Use the
{id}
,{summary}
,{number}
,{project}
placeholders. - Task history length — number of tasks AppCode will store.
- Save context on commit — every time you commit changes, AppCode will create a new closed local task that will keep files you have worked with. This way, you will be able to quickly restore all tabs associated with the task any time in the future.
- Changelist name format — when you open or create a new task, AppCode will prompt you to create a new changelist associated with this task. In this field, you can specify a template that will be used for generating names for new changelists. Use the
Open tracker tasks
Tacker tasks are loaded to your AppCode once you connect it to your issue tracker.
- Go to (⌥⇧N), or click the task combo on the toolbar.
- Select the necessary task from the list.
-
In the Open Task dialog, you can update issue state.
If you want to close all tabs that are currently opened in the editor, select the Clear current context checkbox.
-
In the VCS operations section, you can create a new changelist, select an existing branch to which you want to contribute, or create a new one.
You can also shelve the current changes to return to them later.
Create local tasks
In AppCode, you can create local tasks that do not originate from your issue tracker.
- Go to . You can also use the task combo or just press ⌥⇧N.
- In the Enter task name dialog, select Create New Task.
-
Enter a name for the new task.
If you want to close all tabs that are currently opened in the editor, select the Clear current context checkbox.
-
In the VCS operations section, you can create a new changelist, select an existing branch to which you want to contribute, or create a new branch.
You can also shelve the current changes to return to them later.
View task description
When you are choosing a task to switch to, the list of tasks shows only task IDs. This information is not always sufficient, because it reflects neither the steps that lead to the problem nor the related discussion.
- Go to .
- Open the necessary task and press F1 to open the task description in AppCode, or ⌥⇧B to view the description in a browser.
Alternatively, go to Show 'task ID' Description or Open 'task ID' in Browser.
and clickView closed tasks
A closed local task is a task that is not associated with a changelist if the entire project or the affected directory is under a version control.
A closed tracker task is a task that has the closed status in your the issue tracker.
- Click the task combo and then click Open Task.
- Select the Include closed tasks checkbox, or press ⌥⇧N.
Close tasks
- Go to Close Active Task. and click
This will close the current context in the AppCode. Select the necessary checkboxes to commit changes and, optionally, merge the branch that was created. For tracker tasks, you can also change their state. The new state will be propagated to your issue tracker.
Delete tasks
If you do not need a task to appear in AppCode, you can remove it from the list of tasks.
- Click the task combo on the main toolbar.
- Select one or more tasks you want to delete.
Use SHIFT (for adjacent items) or CTRL (for non-adjacent items) keys for multiple selection. - Click the right-arrow button, and select Remove.
When you are deleting tracker tasks, you remove them from the IDE. They will remain in your issue tracker. Local tasks in this case will be completely removed, since they are not connected to your issue tracker.
Time tracking
With AppCode, you can track the amount of time you spend on a task working in the editor. For local tasks, this information might be helpful if you want to know how much time exactly you need to compete a task as you work on a project.
For tracker tasks, this option is useful if your issue tracker configuration requires that you log the time you spend on tasks. In this case, you can send your time log from AppCode to the tracker.
Enable time tracking
- In the Settings/Preferences dialog, go to , and select the Enable Time Tracking checkbox.
- (Optionally) Change the Suspend delay value. Here you can specify how much time you have to stay inactive before the task will be considered suspended.
In the Time Tracking tool window, use the Auto mode for automatic time logging, or the Start timer for the active task and Stop timer for the active task options for manual time recording.
Send time log to tracker
To send the recorded time log to your issue tracker:
- Click Post work item to bug tracker in the Time Tracking tool window.
- Specify time interval you want to log. Optionally add a comment.
- Click OK to push the log to the tracker.
Working with contexts
A context is a set of files that are connected with a task. With AppCode, you can save and clear contexts without associating them with specific tasks.
Save a context
- From the main menu, select on the main menu, or press N/A.
- (Optionally) In the Save Context dialog, specify a comment, if necessary.
Switch between contexts
With AppCode, you can switch between contexts that are not associated with specific tasks. This will let you work with tasks and switch between them without mixing the changes that were made between both tasks.
- From the main menu, select , or press N/A.
- In the Load Context popup, select the necessary context from the list.
Alternatively, click the right arrow and select Load.
Clear a context
- To clear the current context without loading another one, select from the main menu, or press ⌥⇧X.
Delete a context
When a task is finished, or if you do not need a context anymore, you can remove it. To delete a context:
- From the main menu, select , or press N/A.
- In the Load Context popup, click the right arrow and select Remove.