How do I use the Groups.pm in Request Tracker? - perl

In lib\RT\CustomFieldValues\ there is the groups.pm file which is supposed to be an example of how to get data into a custom field, but how do I actually use that once I have written it? Does anyone have any documentation or a sample of this?

I have finally figured it out, to use the Groups.pm module you need to go to /opt/rt3/etc and edit the RT_SiteConfig.pm and add the line
Set(#CustomFieldValuesSources, "RT::CustomFieldValues::Groups");
Restart Apache and it will be available as a new field source.
I have written a blog post on doing this which also includes details on how to build your own module in case anyone is interested in doing this: AD Lookup Control in Request Tracker

Related

Creating moodle plugin to accept REST calls and create activities/notice/files

Im quite new to moodle development. Im trying to post activity/notice to a selected course. I could not find any webservice for creating activities within a course. Is there any way i could create a plug-in where i could make a REST call to the plug so that it would create a notice?. An example would help allot.
STEP 1
To create local plugin you can follow following folder structure according to Moodle documentation (https://docs.moodle.org/dev/Local_plugins)-
local/
yourplugin/
db/
access.php
install.php
install.xml
lang/
en/
yourplugin.php
index.php
settings.php
version.php
Meanwhile, creating local plugin does not always really solve all problems as there are limitation depending what you really want to achieve.
what worked for me was editing //moodle_dir/course/modedit.php file, and i was able to make REST Call to add scorm activity to any course i want.

create an account on Parse

I wanted to create an account on the platform Parse but I receive a message saying that Parse no longer exists .. They changed their web address ?enter image description here
Yes ,parse services are no longer available ,consider using firebase or something along that lines.
You can't really create an account, but you can still use their service as it is open sourced now. Parse
So while Parse is no longer available as a service from the company you can still set up your own parse server and run it yourself. It is open source now. You can use heroku and github has great documentation on this. The link is below.
https://github.com/parse-community/parse-server

Manatee.Trello: Webhook Code Sample

I am looking for a code sample on how to use Manatee.Trello Webhook feature.
I found some documentation here: https://bitbucket.org/gregsdennis/manatee.trello/wiki/Webhooks, but it's not clear enough for me.
It only demonstrates how to create a Webhook, but doesn't demonstrate how the real-time updates are received and processed. Tried the Updated event on the Webhook, Card and Actions - but clearly I am not doing something correctly.
Any help would be appreciated.
This article demonstrates webhooks in general:
https://blogs.msdn.microsoft.com/webdev/2015/09/04/introducing-microsoft-asp-net-webhooks-preview/
Basically, there is a NuGet package Microsoft.AspNet.WebHooks.Receivers.Trello that you can install that does all the heavy lifting.
Once the NuGet package is installed I can override the built-in Controller and use Webhook.ProcessNotification() as Greg Dennis had suggested.
Hope someone out there finds this useful.
You'll need to set up the web portion yourself. This can be done with an ApiController (or others).
Once you receive a POST message, read the content as a string (don't deserialize), and pass that to Webhook.ProcessNotification(). Manatee.Trello well take care of the rest.
This will trigger the Updated events.
EDIT
I have created some better docs. Here is the example you seek!
https://gregsdennis.github.io/Manatee.Trello/examples/webhook.html#processing-a-webhook-notification

Creating Build Configuration via REST in Teamcity

Is it possible to create a new build configuration for an existing project via REST api(POST method) in Teamcity?
If so, how to create? (some guidelines )
Thanks
It's for sure possible on 8.x, haven't the need to care about early versions.
Here's a really simple python snippet that will copy an existing build config into a given project using this as a guide http://confluence.jetbrains.com/display/TCD8/REST+API#RESTAPI-BuildConfigurationAndTemplateSettings.
import requests
xml = """<newBuildTypeDescription name='NewBuildConfigName'
sourceBuildTypeLocator='ExistingBuildConfigNameThatYouWantToCopy'
copyAllAssociatedSettings='true' shareVCSRoots='false'/>
"""
headers = {'Content-Type': 'application/xml'} # set what your server accepts
print requests.post('http://YOURTEAMCITYWEBADDRESS:YOURTEAMCITYPORT/httpAuth/app/rest/projects/id:PROJECTIDWHERENEWBUILDCONFIGSHOULDBECREATED/buildTypes', data=xml, headers=headers, auth=('TeamCityUserName','TeamCityPassword')).text
Its now possible in 8.x REST. You can do something like:
POST plain text (name) to http://teamcity:8111/httpAuth/app/rest/projects/<projectLocator>/buildTypes
Above is copied from 8.x REST. Check 8.x REST for more details.
No, it's not implemented in the REST API. Have a look at this
There is no way to create a build configuration. You can add build steps to it and configure them, but it doesn't seem to be implemented in the API at all. I was actually fighting with this myself last night. If you find a way to do it, please let me know.
Also, you could have a look at these notes I've put together concerning the Teamcity REST API. (Not that they're answering this question, but some of them could be quite useful).
Well, you can refer to this for starters:

vBulletin Post ID Variable in Plugin

First off, I'd like to thank anyone who replies in advance--
I am using vBulletin 3.7 (old, I know...), and I am trying to add a plugin that includes the variable $post['postid']. However, it doesn't seem to work. The hook location is 'postbit_display_start'.
I see no need to post more information; the problem is very small, and hopefully very simple.
Try to use postbit_display_complete as the hook location.
And use this plugin code on your local installation
echo '<pre>';print_r($post);echo '</pre>';
To see what are within $post.