Trigger a plugin step on "entityimage" change - plugins

I created a plugin that should upload the contact entity "entityimage" to an external storage.
The code itself should works (it works as a console app), but I am unable to add a step that trigger on "entityimage" change as I can't find it in the filtering attribute list in the Plugin Registration Tool.
Is there a way to trigger this plugin only when "entityimage" change?
Regards,
Dremor

Reviewing the Contact's entityimage field in the Metadata Browser indicates that it is a "Virtual" field, which may be why it is unavailable as a filtering attribute.
Also, according to the SDK there does not appear to be any other message available besides "Update" on the Contact that could be used to indicate that the entityimage has changed.
And, changing the image through the UI does create an Audit History entry, however, it is a generic "Update" entry, with the old value and new value blank.
It appears that triggering a plugin on change of only the entityimage field is not possible, nor do there appear to be any OOB hooks to see if that field has changed.
The only other think I can think to research is Change Tracking. Otherwise it looks like you may have to upload the image on any Update of a Contact.
Or, you could sync the image URL's from CRM to an external system and compare the one in CRM to the external system before uploading.

Strangely enough, if you don't set any filtering attributes the plugin does get triggerd when changing the image, but i guess this also means that all field changes will trigger it.

Related

Trigger Azure DevOps web hook's on bug description change

I'm configuring a web hook to make a POST when tasks of type bug are changed in a project. I'd like Azure to make the POST only when the description of the bug changes, but I'm not seeing this option on the config modal
Is it possible to make this configuration? Is there any other field that's equivalent to the Discussion field?
In the default setting, the Bug work item only contains a discussion field.
Based on your requirement, it seems that you want to trigger the web hook when Discussion field update.
On the backend, the discussion field is equal to System.History。
So you can set the History field in Webhook.
For example:
Then when you update the Discusstion field, it will trigger webhook.

Will adding all attrbiutes to PreImage/PostImage to plugin step have impact on performance?

When registering plugin images and selecting all attributes to the image, the Plugin Registration Tool says that
"This plug-in will execute on all changes to the attributes associated to this message type!. This can create performance issues for your application and it is recommended that you filter your step registration to trigger on only the attributes you care about".
I set filtering attributes for the step.
So will setting filtering attributes save me from what that caution says?
For Example if you have Plugin on Update of Contact and filtering attribute is set to All, It will run on any field change on contact and this will definitely cause performance issue.
Now when you have filtering attribute set to only few fields for example fist name, last name and so on it will restrict to fire your plugin only on those field.
You can get all the attributes in pre image and post image but best case it to select only those attributes you need in your transaction.
Adding all fields in Pre and Post image will not add much burden/impact on your performance, but it will definitely add performance issue if your filtering attribute has all the fields selected.

is it possible to show contact number of current logged in user when artifact is created in tuleap

We are using the Tuleap 7.0 for Project management. We have a new requirement that we need to show the contact number of current logged in user when a artifact is submitted either in a separate field or in the same field (submitted by). Is it possible to show or what type of code change has to be done, to retrieve the current logged in user information when artifact is created. Kindly do needful.
That's not easy. There are two main steps: one surrounding the user; the other surrounding the artifact.
First you would need to edit PFUser.class.php to add the property to the user object. You would also probably need to create a forgeupgrade script (database upgrade) so that you could save and modify the property. Obviously the UI and scripts that manage the CRUD of a user would also need changing.
Next, you would need to create a new type of class that extends TrackerformElementField, make that type available for use in the Tracker Field administration and set its value to the user's contact number.
Unfortunately, any of these modifications, if not done carefully, can have important side-effects. If you want to write your code and have it reviewed by the community, you can go through gerrit.tuleap.net and read the developer guide

Smart Form changes not reflecting in site. #Ektron

I have edited my existing smart form in smart form configurations in settings menu.
Then I have published and updated the smart form in contents folder properties.
Now I went to particular content which is using that particular smart form in CMS 400 editor and I can see the changes.
But when I go through the page in browser it still shows the old smart form.Unable to reflect changes in browser. please help me.
Thanks in advance
It would help to know what version you're running. That being said, there are a few things that could be going on here...
Caching
FrameworkAPI caching might be turned on, in which case you'd have to wait for the cache expiration or recycle the app pool in order to see updated content. Caching is enabled in web.config by changing the defaultContainer property in this section to Cache.
<ektron.framework.services>
<unity configSource="ektron.cms.framework.unity.config"/>
<framework defaultContainer="Default" childContainer="BusinessObjects"/>
</ektron.framework.services>
Republish the content
Changes to a smart form definition won't immediately trickle down to all content blocks using that particular smart form. If you add a field (for instance), that field won't exist on any content blocks unless you open up that content block in edit mode and republish it. It will automatically be added to the content block when you click Edit, but that change won't be saved until you click publish.

is it possible to get an xPages build number?

I do all development in a single application. when a new version is ready I create a template and give it a version number. this way I can store a history of all previous versions.
the development templates are used to push the new design to many applications via replace design.
Creating manual version number or template names is fine but I am looking for a more automatic way of finding out which build the different applications are inherited from
When I visit the different applications I would like to be able to see which build number each application are inherited from. is this possible?
A simple build time stamp could do, but is there a built in build number that can be used and that can be displayed on the xpage.
e.g Build 2012092712345
Update:
Thank you for all your answers, many good suggestions but it looks like all require manual work.
The best solution would be if there is a way to read (from ssjs) a timestamp from any file within the nsf that is always updated during a build. is this possible?
In classic notes, there was a method to add a shared field with a special name to the application. Cannot remember the details, but have it somewhere on the disk.
Then you can see the build number in the design tab of the application properties. And you can of course display the value in your applikation as well.
But you have to fill the item manually on each build. Or use teamstudio Buildmanager. This tool adds the value automatically.
And I also guess that you can write some code that changes the value whenever you create a new build.
Another option would be to use a versioning system like CVS/SVN. This is possible since 8.5.3.
Source control
I think I know what you are meaning. Your a pushing out design and want to check thru code what version each database has. I usually do this with a Build form. In this form I have computed fields with all the data I want to retrieve. Then I open the database with an agent create a document
and set the form field to "BuildForm" and do a computewithform.
Now I can see all information about this database.
I once wrote a rudimentary build system for "classic" Notes, and had the last part of the build pipeline create a form named _BUILDID_, and put the build id in the $Comment field.
The main reason to create a form instead of a shared field was that I could dynamically fetch the form using NotesDatabase.Forms, and open up the desired field.
I sure hope there are simpler solutions nowadays... :-)