I am migrating my support forum to Discourse from a helpdesk (YouTrack).
I would like to use API to do the following:
Pull users (name, username, e-mail) from YouTrack and create similar users in Discourse. Not setting passwords for them!
Send an invitation to all these users to sign up in Discourse, using the same usernames and e-mails (for them to create new passwords).
Pull certain topics, attachments, and comments from YouTrack and create the same in Discourse.
For that, I will need the same users to exist in Discourse so that they could be made authors of topics and comments. This has to be done, no matter whether such users have signed up in Discourse after receiving the invitation, or not.
Problems:
a) The API documentation says that the “password” field is required when creating a user. How can I work around it?
b) What should be the state of such user (created via API, already has some topics under his name, but not yet confirmed, nor password set)?
I would create the users, categories, topics, and posts using an import script rather than the API.
I’m not quite sure how best to email every single user, but one way would be to have the import script leave users activated and allow them to get a summary message emailed to them and see that the summary email includes instructions for accessing the new forum.
I tried to use this script of yours, that seems to be doing the trick, but keep getting an error message:
./create-user 'Test User Four' me@[domain] test4 41 default
Creating user: test4 user test4 created. . . Adding to group 41. . . {"errors":["You supplied invalid parameters to the request: usernames"],"error_type":"invalid_parameters"}
Can’t figure out, what have I done wrong. Also, is it possible not to set group and password here?
I mostly don’t know, but it seems like you have a bogus group number and you’re getting an error? If it’s adding the user then it would seem that it’s not setting a group already.
You could change the script to have it not set a password, I think, but setting a random password that no one knows is pretty much the same thing as no password.
If you need customization and have a budget, I can probably do it later today.
The group number is correct, I took it from /groups.json. Anyway, my current goal is to find out the solution with whatever tools are available. Thank you for your offer and help though!
Hmm. Well, the script definitely needs to be updated to send the API user and key in a header rather than in the URL. While I’m pretty sure that it worked two years ago, it looks like it was written by someone with two years less experience than I have now.
It doesn’t do any error checking to see if the user actually gets created, so that’s something that I’d change if I were to work on it.
It looks like if you don’t have any groups it’ll skip trying to add the user to the group.
كلا السببين صحيحان. أردنا تقديم الدعم لعملائنا عبر منتدى مفتوح، حتى يتمكن العالم أجمع من رؤية مدى روعتنا :-). ولم يكن YouTrack أداة مناسبة لذلك لعدة أسباب، ومن بينها أنه يفرض رسومًا حسب عدد المستخدمين.
إعدادنا الحالي هو كالتالي:
Discourse للدعم، وطلبات الميزات، والمناقشات. كما تصل نماذج “اتصل بنا” على مواقعنا الإلكترونية إلى هناك أيضًا (يتم إنشاء مواضيع جديدة ومستخدمين “مُجهَّزين” تلقائيًا عبر واجهة برمجة التطبيقات)
YouTrack للتطوير - المهام، والأخطاء، والمشكلات الأخرى
Confluence للوثائق العامة. كما تُنشر بعض المقالات التي تصف حالات استخدام محددة على Discourse (يدويًا)
كما جربنا استخدام Discourse كمدونة لشركة، لكننا فضلنا لاحقًا Hashnode.
نحن على وشك نقل التوثيق من Confluence. فله وظيفة بحث ضعيفة ورسوم دفع مرتفعة. يتمتع Youtrack بميزة قاعدة معرفة مع دعم للـ Markdown. كما أنه يتميز باستيراد سهل، ووظيفة البحث مقبولة. يُعد Youtrack نظام تتبع الأخطاء الخاص بنا، وسنحتفظ به.
إذا كنت قادرًا على تأكيد أن قاعدة المعرفة في YT بطيئة في بيئة الإنتاج، فيمكننا النظر في عدم استخدامها.
يُستخدم Discourse كنظام دعم من المستوى الثالث. الوظيفة الرئيسية هي حفظ حلول العملاء ومشاركة أفضل الممارسات. للأسف، استخدام Discourse للعملاء صعب. لأن فريق دعم العملاء يستخدم Service Desk. كما أنه من الصعب جدًا إنشاء مئات الفئات الخاصة لكل عميل.