How To Make Sitecore Workflow Comments Mandatory For Specific Item - sitecore

I have a requirement to make workflow comments mandatory for a specific type of item.
I am trying to override the workbox comment method .
If anyone has worked on something like this plese help me here.

Related

Add column in OTRS ticket view

When I open a ticket I see a list of prior interactions.
I would like that list to also include the time spent/reported when the interaction was added.
But how? There are soooo many configuration options!
Regards,
Jeroen Baten
if by list of prior interactions you mean the article list, then I'm afraid that you can't do that just by config options. You'd need to edit the module and the template.
if not, please add an screenshot or some explanations of what you want and where you want it.

Sitecore Conditional Showing of Fields

So I am rather new to sitecore, and it's a topic that wasn't covered during my training. My questions is just to help point me to the correct term, or documentation on a method to do the following.
I have a definition item, with a ton of field groups, what I want to do is something like:
if Value of Field X is "yes" then collapse/hide Field X or Field Group X.
Does that make sense? Is it a validation rule? or some other kind of rules, is it a workflow I need to attach? Do you place it on just the field I want to hide, or the field that triggers the action?
I appreciate any guidance.
There is nothing out-of-the-box in Sitecore to achieve what you want but there is no reason you cannot create a composite custom field type to do this. The following articles will help you achieve this:
Creating a custom Sitecore Field
Getting to Know Sitecore: Custom Fields, Part 1
Create a new control, inheriting either from Droplist (if the comparison of the value is to be text based) or Droplink (for comparison of ID). You could add a parameter in the Source field of the control to specify what the values that trigger the hide should be.
The underlying control in the Content Editor is just a standard HTML select element. Add onchange events to the control and add your Javascript handler to hide the other controls. Since I could not find a way of adding additional custom css classes to the Sitecore controls, it would be best/easiest to hide all other controls in the same collapsible group after you control. This would mean you would need to group your controls better (or logically at least).
The Javascript will be something like this (the Content Editor uses the Prototype JS framework):
if ($(this).getValue() == 'no') {
// find the parent container of this control and then hide all the next siblings in the same group
$(this).up('.scEditorFieldMarker').nextSiblings('.scEditorFieldMarker').invoke('hide');
}
You can test this by running the above in the console, change out the keyword this with the id of your field, e.g. $('FIELD2292054').
What I am not sure about is how to trigger the hide on initial load, i.e. when someone returns to an existing item, it may be possible by adding to one of the pipelines, but would be better using a JS solution if possible. I'll have a think about this and get a proper code sample up over the next few days.
EDIT: You can add an event handler to sc:contenteditorupdated to handle the content editor being rel-oaded.
document.observe("sc:contenteditorupdated", myFunction);
I wrote up a blog post and put the code on GitHub if you are interested.
Not sure if you have come across Andy Uzick's this blog post.
He wisely talks about hiding fields in the Content Editor and has also created a Sitecore Module called Hide Field Template Extension which is hosted on the Sitecore Marketplace with the full source code to extend.
After reading through and trying the extension, I do feel that it will not completely resolve your issue (how you have described it in the question).
But it will give you:
A mid-term solution to hide a few unnecessary field that some content editors would not like to view.
Fields that are only required by administrators for admin purpose - to de-clutter these fields could be hidden.
Just one thing to bear in mind that it mentions in the requirements Sitecore 6.5 & 6.6. I have not tested it in Sitecore 7. If you are using Sitecore 7, which I think you are, one could modify the source code and make it work for Sitecore 7.
Have a look and share your findings.
Happy Sitecoring!

Validate unpublished items and give a warning

Scenarion: Content Editor users keeps adding several articles, they can be in different places in the content tree. They want to know that which items has to be published by looking at validations in the content tree.
Can someone help me to write a validation rule to identify whether item is not published and give a warning saying "Item has not been published yet".
Thanks.
There's a module called the Published Item Comparer that might do what you need:
http://blog.velir.com/index.php/2011/04/29/published-item-comparer/
You could also consider using Workflow, and set the final approval step to also publish the item if you want. The user will be able to see what step of the workflow process the items are in the Workbox.

Are workflow comments customizable?

Does anyone know of any way to customise the Workflow Comments box that appears in Sitecore if you enable the "comments" option?
I'm looking to extend this a little ... but can't see this referenced in any sitecore javascript or shell files - I'm guessing I will need to build a custom dialog in its entirety to implement the functionality I want, but not 100% where to start!
We ended up putting a solution in place that, broadly, composes of a custom action, containing the relevant form that we need. The information that the user submitted was then parsed, and passed to the workflow as comments (this particular workflow command was hidden from users, so they had to go through our custom one).
Not ideal, but works!

Redesigning the node comment while using the nodecomment module

I am using nodecomment module in drupal 6.2. I need to change the design, look and feel of the comments attached to each node. Since i am using the nodecomment module so , i added few extra fields to the comments which needs to be repositioned and redesigned.
Being a novice in drupal, I have absolutely no idea how do i proceed. Please help
Thanks in advance :)
You can go fairly far with CSS and the "Manage Fields" and "Display Fields" settings of your content type. For more in-depth changes, you can override the node-comment.tpl.php for the comment nodes and view templates for different listings of contents.