Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API : Tags not updated when updating a note #941

Closed
foxmask opened this issue Nov 1, 2018 · 4 comments · Fixed by #2649
Closed

API : Tags not updated when updating a note #941

foxmask opened this issue Nov 1, 2018 · 4 comments · Fixed by #2649
Labels
api Joplin API bug It's a bug

Comments

@foxmask
Copy link
Contributor

foxmask commented Nov 1, 2018

note creation

curl -H 'Content-Type: application/json' --data '{"title":"my note", "body":"some markdown", "tags": "tags1,tag2,tag3"}' http://127.0.0.1:41184/notes
{"title":"my note","body":"some markdown","parent_id":"0882e5b783b94f61baa428273147fbbf","source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","id":"a315850d76b54bd5960e05042f976eb7"

updating the tags looks fine

 curl -X PUT -H 'Content-Type: application/json' --data '{"title":"my note", "body":"some markdown", "tags": "tags1,tag2,tag3, tag4"}' http://127.0.0.1:41184/notes/a315850d76b54bd5960e05042f976eb7/?token=my_long_token
{"id":"a315850d76b54bd5960e05042f976eb7","parent_id":"0882e5b783b94f61baa428273147fbbf","title":"my note","body":"some markdown","created_time":1541081002837,"updated_time":1541081146841,"is_conflict":0,"latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":0,"user_created_time":1541081002837,"user_updated_time":1541081146841,"encryption_cipher_text":"","encryption_applied":0,"type_":1,"tags":"tags1,tag2,tag3, tag4"}

but if I look at the database

sqlite> select tags.title from note_tags,tags where note_id = 'a315850d76b54bd5960e05042f976eb7' and tag_id = tags.id;
tags1
tag2
tag3

no tag4

@foxmask foxmask added bug It's a bug api Joplin API labels Nov 1, 2018
@stale
Copy link

stale bot commented Sep 22, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale An issue that hasn't been active for a while... label Sep 22, 2019
@foxmask
Copy link
Contributor Author

foxmask commented Sep 22, 2019

bug still here

@stale stale bot removed the stale An issue that hasn't been active for a while... label Sep 22, 2019
@foxmask foxmask changed the title Joplin API : tags not updated when updating a note Tags not updated when updating a note Sep 27, 2019
@foxmask foxmask changed the title Tags not updated when updating a note API : Tags not updated when updating a note Sep 29, 2019
@stale
Copy link

stale bot commented Dec 28, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale An issue that hasn't been active for a while... label Dec 28, 2019
@foxmask
Copy link
Contributor Author

foxmask commented Dec 28, 2019

it's still the case

@stale stale bot removed the stale An issue that hasn't been active for a while... label Dec 28, 2019
laurent22 pushed a commit that referenced this issue Mar 13, 2020
…est (#2649)

* API: Fix updation of tags when updating a note

* Add test for fix updation of tags

* Rewrite unit test and change variable name

* Use consistent variables and function calls

* Use default function call and change variable

* Handle case when tags is empty string

* Restructure test cases and improve tags check

* Update documentation
@lock lock bot locked and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api Joplin API bug It's a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant