A powerful task management plugin for SiYuan Note that integrates with JIRA and Lark/Feishu to synchronize project tasks with SiYuan database.
- JIRA Integration: Automatically sync JIRA issues to SiYuan database
- Lark/Feishu Integration: Connect with Lark/Feishu tasks and display them in SiYuan
- Flexible Field Mapping: Customize how external fields are mapped to SiYuan database columns
- Custom Color Coding: Assign colors to status and category options for better visualization
- JavaScript Expressions: Use custom JavaScript code to transform and extract data
- Time Tracking: Record working hours directly in documents and sync to JIRA/Lark and daily notes
- Open SiYuan marketplace
- Search for "Task Management"
- Click Install
- Enable the plugin
- Go to plugin settings
- Select the "JIRA Configuration" tab
- Enter your JIRA server URL (e.g., https://your-domain.atlassian.net)
- Enter your JIRA username (email)
- Enter your JIRA API token (generated from Atlassian account settings)
- Configure field mappings by clicking "Edit Mappings"
- Go to plugin settings
- Select the "Lark Configuration" tab
- Enter your Lark API base URL (default: https://open.feishu.cn)
- You need to create a custom plugin in Lark (this project uses the test channel to get tokens, your Lark workspace doesn't need to install this plugin), enter your Plugin ID (from Lark developer console)
- Enter your Plugin Secret
- Add your User Key (double-click on your avatar in Lark project to get it) and Space ID
- Configure field mappings by clicking "Edit Mappings"
Field mappings allow you to specify how external service fields are mapped to your SiYuan database columns:
- SiYuan Column Name: The column name in your SiYuan database
- External Field Path: The path to access the field in the external service API response
- Data Type: Text, Date, Select (with color options), or URL
fields.summary
js: data.fields.timetracking ? `${data.fields.timetracking.originalEstimate || '0h'} / ${data.fields.timetracking.timeSpent || '0h'}` : 'Not set'
fields.status.name
- Issue status namefields.priority.name
- Priority levelfields.assignee.displayName
- Assignee namefields.summary
- Issue summaryfields.updated
- Last updated timejs: data.fields.issuetype.name + ' #' + data.key
- Issue type and key combinedjs: data.fields.customfield_10016 ? data.fields.customfield_10016.value : 'No value'
- Custom field with safe access
name
- Task nameupdated
- Last updated timejs: data.creator ? data.creator.name + ' (' + data.creator.email + ')' : 'Unknown'
- Creator with email
You can use JavaScript expressions for complex data transformations by prefixing your field path with js:
. The source data is available as the data
variable.
-
Combining multiple fields:
js: data.fields.summary + ' [' + data.fields.status.name + ']'
-
Conditional formatting:
js: data.fields.priority.name === 'High' ? '❗' + data.fields.priority.name : data.fields.priority.name
-
Date formatting:
js: new Date(data.fields.updated).toLocaleDateString('en-US')
-
Calculations:
js: data.fields.customfield_10024 ? Math.round(data.fields.customfield_10024 * 100) / 100 + '%' : '0%'
-
Default values:
js: data.fields.assignee ? data.fields.assignee.displayName : 'Unassigned'
- JavaScript expressions are executed in a sandboxed environment
- Access to browser APIs like
window
,document
, Node.js modules, and dangerous functions likeeval
is blocked - Keep expressions simple and focused on data transformation
- Create a database in SiYuan
- Configure the plugin with your JIRA or Lark/Feishu credentials
- Set up field mappings to match your database columns
- Use the plugin to fetch and sync tasks:
- Add a row in the database and create an ID column (text type)
- Enter JIRA or Feishu work item ID/number in the ID column
- When ID input is complete and loses focus, the plugin will automatically fetch task information and populate the corresponding mapped fields
- Your external tasks will appear in the SiYuan database with all mapped fields
This plugin monitors changes to the ID field in SiYuan database to trigger task synchronization:
- When a task ID is entered in the database ID field and loses focus, the plugin detects this change
- The plugin automatically queries the corresponding task information based on the configured service type (JIRA or Feishu)
- The queried task information is populated into other columns in the database according to field mapping rules
- The initial configuration may require some trial and error with field mappings
- API rate limits may affect large synchronization operations
- Custom fields require specific paths that might need to be determined through API testing
- Complex JavaScript expressions should be tested carefully
If you encounter issues:
- Check your credentials and ensure API tokens are valid
- Verify field mappings by testing simpler paths first
- Look at the plugin logs for error messages
- For complex field paths, use the debug mode to see the complete API response structure
- For JavaScript expressions, check the console for error messages
MIT © Rick Yang
This plugin includes a time tracking panel that allows you to:
- Record Time: Enter time spent directly in task details
- Sync to JIRA/Lark: Automatically post time entries to external systems
- Save to Daily Notes: Optionally record time entries in SiYuan daily notes
- Enable "Time Tracking" in settings (enabled by default)
- Open a document containing a task database
- Open the document context menu (right-click or three-dot menu)
- The system will automatically recognize task IDs and display the time tracking panel
- Fill in time information and submit
- Time entries will be synchronized to JIRA or Lark
- If "Sync to Daily Notes" is enabled, entries will also be added to the current day's note
- JIRA time format uses "1h 30m" (1 hour 30 minutes)
- Lark time records use hours as units and will be automatically converted
- Daily note sync depends on your SiYuan daily notes settings