custom sitecore shell tools for en masse workflow approval - sitecore

I'm wondering about documentation to create a simple custom ribbon control for sitecore shell.
The problem i'm trying to address is that Admins should be able to force all subitems recursively to be approved to a certain workflow state (rather than approve each one manually), but we currently don't know any way to achieve that.
To solve this, we want to force items throught the workflow state (triggering the corresponding commands) programmatically, but we need a sane way for admins to interact with this, the sensible option would be a custom thingie in sitecore shell, but we aren't sure how easy is to achieve that.
any recommended readings for this problem?

Though this article claims to be written for Sitecore 5.3, the same steps apply for 6.x as well. Note: it requires access to the SDN: How to create a ribbon button in Sitecore v5.3
The high-level points from the article are:
Create a new class that inherits from Sitecore.Shell.Framework.Commands.Command
Mark the class as [Serializable]. It might not be necessary for simple commands, but add it now so you don't get problems later! Otherwise the button might not work correctly (this is related to pipelines - and the fact that pipelines might be stopped and resumed)
Override Execute() and possibly also GetIcon(), GetHeader(), QueryState(), GetClick(), GetSubmenuItems()
Add a new <command name="…" type="..."> tag to /App_Config/Commands.config file
Log into Sitecore and switch to the core database
Navigate to /sitecore/content/Applications/Content Editor/Ribbons and create (or copy) a command in the desired chunk
Enter your command name (the one from step 4) in the "Click" field (and supply a Header, Icon, Tooltip, etc)

Related

TFS Allow all states for a work item

Is it possible to open up all possible states for a work item - essentially removing the state transitions?
I am hoping to use a tool outside of TFS for managing work items and would like to know if it's possible to simply allow all states at any time?
If you want to remove the transitions between work item, you need to customize the work flow.
You change the workflow to accomplish the following objectives:
Add or remove a state, reason, or transition.
Specify a value for field to be applied during a change in state,
reason, or transition..
Specify a custom ACTION to automate field assignments based on a
change in state, reason, or transition.
Detail steps to customize the workflow and more info about it, please refer this Modify or add a custom work item type (WIT) from MSDN.
Moreover, here is a 3rd party extension called TFS Work Item Manager which is an innovative team workload coordination platform that helps you manage your TFS work items in a much more efficient and intuitive way. You can also take a look at it.

Sitecore item:setdefaultworkflow and item:resetdefaultworkflow commands

I am Using Sitecore 6.6
I believe item:setdefaultworkflow and item:resetdefaultworkflow commands are used to reset the workflow fields on an Item with values set on Standard values.
If not please correct me.
Here is the Path in Core:
/sitecore/content/Applications/Content Editor/Ribbons/Chunks/Workflow/Set Default Workflow
commands are not shown on the Ribbon. How do I use these commands? what is their purpose. Any Help is greatly appreciated.
I am aware of Version >> Fields(Reset)>> then choose the fields to reset with multiple clicks.
I am trying to use these commands if they solve my purpose to reset the Workflow Fields to standard values with a command on Review Tab >> Workflow section with one Click.
As far as I'm aware, these buttons are only visible on __Standard Values items. They are used to assign the workflow that will be used for new versions of that template going forward, or to clear the workflow that has been set (note that items which are already part way through a workflow will still need to finish it before they are no longer associated with a workflow).
The idea is that you assign the workflow to the standard values of templates (or base templates) in your solution, and those settings then get carried through to your content items.
Although you are able to, I'd advise against fiddling with the workflow fields on individual items before you fully understand the purpose of the fields.
For more information, I'd suggest looking at the Sitecore workflow reference document: https://sdn.sitecore.net/upload/sitecore6/60/workflow_reference_sc60orlater-a4.pdf

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!

Sitecore Webforms for Marketers - one form, multiple screens

Is it feasible to have a form in WFFM that has multiple "screens"? For instance in the first "screen" you enter some information and click NEXT, then the second "screen" asks you to confirm the information you entered in the first screen, and then the user clicks SUBMIT and the action (i.e. saving to DB) is performed.
Thanks,
FG
This kind of functionality is not supported out of the box. Whenever we run into cases like this we tend to build our own custom forms using standard .net functionality. I guess this would be the way to go for you aswell, since you will have more control over the behavior of different elements. WFFM is a good module but for special elements as you describe above you could best build your own custom code.

oracle apex interactive report template

I have several similar interactive reports. I want to have some kind of a template to which all reports will adhere. For example each report need to have a button and it's tedious to add button to each new report. If I want to change something in common part of all reports, I will need to go through all reports and apply changes that is difficult.
There isn't an ideal solution for you, but here are some things you can do to make creating new reports easier:
When creating a new Interactive Report (IR) region in an application, you could start by copying an existing IR in the same application. This gives you the option to copy any associated items and buttons at the same time.
You can create a "template" page (I normally call it a "skeleton" page to avoid confusion with the concept of Apex templates) with a typical set of components: IR region, standard buttons, items, processes. To create a new report, create a new page as a copy of the skeleton page and then modify it as required.
Neither of these deal with your second problem: if at a later date you decide that all IR regions should have a new "Foo" button, you are going to have to change each one individually. You could consider an approach using the Apex Builder APIs to generate such buttons, but if you did that (I have in the past) you wouldn't be supported by Oracle!