Square brackets in summary cause errors
Describe the bug If the Jira summary contains square brackets, then updating will cause the URL in the block to become corrupted. Enabling the experimental auto refresh, will eventually rewrite the URLs until errors are thrown on startup.
To Reproduce Steps to reproduce the behavior:
- Create a block with with a Jira issue key where the summary includes a square bracket
- Invoke /Jira: Update Issue
- Note block and URL are as expected
- Now invoke /Jira: Update Issue a second time
- Note how URL has been rewritten, each update will further corrupt the URL
Expected behavior /Jira: Update Issue should rewrite the block information updating information that has changed.
Screenshots From journal file:
- initial invocation of Update Issue
- [⚪️ To Do - RUN-1914|[SPIKE] Investigate other CI-solutions](https://issues.redhat.com/browse/RUN-1914)
assignee:: Lokesh Mandvekar
priority:: Major
status:: To Do
- second invocation of Update Issue
- [⚪️ To Do - [⚪️ To Do - RUN-1914|[SPIKE] Investigate other CI-solutions](https://issues.redhat.com/browse/RUN-1914)|[SPIKE] Investigate other CI-solutions](https://issues.redhat.com/browse/RUN-1914)
assignee:: Lokesh Mandvekar
priority:: Major
status:: To Do
Desktop (please complete the following information):
- OS: Fedora 40
- Browser Firefox
- Version
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22] logseq 0.10.9, Logseq Jira Sync 0.6.0
Additional context
{
"primarySettings": null,
"jiraBaseURL": "issues.redhat.com",
"jiraUsername": "[email protected]",
"jiraAPIToken": "...",
"jiraAuthType": "PAT",
"jiraAPIVersion": "2",
"enableBlockPropertiesHeading": null,
"updateInlineText": true,
"autoRefresh": "No",
"enableOrgMode": false,
"addToBlockProperties": true,
"showSummary": false,
"showAssignee": true,
"showPriority": true,
"showFixVersion": false,
"showStatus": true,
"showReporter": false,
"showResolution": true,
"secondOrgHeading": null,
"enableSecond": false,
"jiraBaseURL2": "orgname2.atlassian.net",
"jiraUsername2": "",
"jiraAPIToken2": "",
"jiraAuthType2": "Basic Auth",
"jiraAPIVersion2": "3",
"queriesJQL": null,
"jqlQueryTitle": "",
"jqlQuery": "assignee= currentUser() AND statusCategory != Done and Updated >= -30d",
"disabled": false
}
Hey, great catch! I was wondering why it was happening in some cases but not others, until you pointed out the nested brackets. Thanks, it's fixed in the new release. Let me know if it doesn't work, and we can reopen the issue.
Here you go!
https://github.com/adyscorpius/logseq-jira/releases/tag/v0.6.1
@adyscorpius
I downloaded 0.6.1.zip and installed it as an unpackaged plugin. The initial lookup works, the update lookup now fails with:
Hi @jwhonce,
Do you have other requests working fine and only this one giving an error? Can you share the headers being sent by a successful and failing request? (Please make sure you remove any API keys and randomize the endpoint.)