Workflow based on component in trac - trac

How is it possible to edit trac so a new ticket with component X follows workflow X and component Y follows workflow Y

Trac doesn't give you a way to do that at the moment. It assumes that your project has a single workflow.
There are some plugins that will give you additional workflow capabilities, however. The AdvancedTicketWorkflow Plugin gives you some advanced commands to use when designing your workflow. See the documentation for the "triage" command for an example of how to route two types of tickets through two slightly different workflows.
The TypedTicketWorkflow Plugin also adds additional workflow capabilities, by allowing you to create actions that are only applicable to certain ticket types.
There are a number of additional workflow-related plugins that you might want to test out. Some of them look like they haven't been updated in a while, though, so be aware that you may run into compatibility issues.

Related

How to queries all the assignments from the repository?

My environment:
Alfresco Share v5.2.d (r134641-b15, Aikau 1.0.101.3, Spring Surf
5.2.d, Spring WebScripts 6.13, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223)
Alfresco Community v5.2.0 (r134428-b13) schema 10005
When I start the workflow, I can assign executors - the list of users who will participate in the business process. Somehow I need to get a list of all those users.
There is an excellent guide, which shows how to use Lucene to get a list of whitepapers.
To interact with repository through REST I'm also use the Web Script Framework MVC.
But how can I get the list of assignments?..
I'm interested in how to look like the query in this case:
...
var assignments = search.luceneSearch("what should be here?");
...
If you want to know who is assigned to a specific running Workflow instance, then I don't think you can easily do that via the search service. Instead, you want to be using the Alfresco WorkflowService to get that.
Most likely you'll want to grab the WorkflowInstance for the specific running workflow, grab the tasks, and check from the properties on that.
If you look at WorkflowPermissionInterceptor from the Alfresco source tree, you'll see pretty much the logic you want, covering both individual assignees and group assignments.

How to add custom field type on KeystoneJS 0.4?

I'm currently building an app for TV/Radio program guide and schedule using keystonejs. I need time input field (hour and minute) for it to work. By default keystonejs doesn't give me an option of time field. Only Date and Datetime are available, none of which are suitable for my use case. Keystonejs documentation doesn't really do the job for >0.4. Although, I can spare its sparse documentation since it's still in beta phase
How to create a new Field type which is usable in production app on keystonejs 0.4.3-beta without directly modifying keystonejs node_modules package?
The one that I found on keystonejs wiki (credit card field type), is to create custom field for development only. And it doesn't even translate to admin UI.
Is it possible to add plugin (such as npm clock-input) to use it as field input on keystonejs admin UI?
I'm still thinking of the best way to integrate schedule system in keystonejs admin UI. For now, I'm thinking of creating a List which contains program name, description, days of the week, and time. In this case, some TV program are supposed to be able to have multiple days, and on specific days of the week it has different time (for example: program A being aired from Monday-Thursday on 4PM, and Friday on 7PM).
I think the way I'm currently planning to implement on is a bit messy. Any suggestion of the good way to do this?
note:
I figure #1 out, although I'm still learning on how it actually works.
I ended up using keystone-custom-fieldtypes npm packages to export my custom input field to keystonejs module without manually touching the file (I use igorrafael fork which works for keystonejs >0.4. Since the original package only works for keystonejs 0.3). You can find it here : https://github.com/igorrafael/keystone-custom-fieldtypes.
I managed to duplicate one of the default field type. So currently I have my custom field type boilerplate. Still need to modify a lot of things though.

How to clean filter modules?

In my application, users are accessing data that are specific to a station.
Because a user is able to switch from a station to another one, I would like to clean filter modules every time the current station is changed.
Icing on the cake, I would like to warn the user if exist some updates unsaved.
One idea would be to chain a reset all filter modules action to the one that allows the user to switch its station.
Unfortunately, there is no built-in action that restarts all the application filter modules, but it would not be much complicated to write one. The idea would be to iterate through all the workspace / modules hierarchy and to restart each module.
In order to restart a module, you can have a look to the standard org.jspresso.framework.application.frontend.action.module.ModuleRestartAction (source here). You could even inherit this action and simply override the execute method in order to deal with all the application modules instead of only the selected one.
Of course, if you feel like it could be a good addition to the framework standards, feel free to submit a RFE or even a PR.

Approach for SharePoint file upload workflow

I'm working on a project that is basically a file upload "wizard" that basically does the following:
Entry form to select document library and enter some basic info.
Enter additional library-specific information.
Tie in some calendar events.
My goals are:
- Create this as a sandbox solution using Visual Studio
- Avoid hacks and reinventing existing functionality as much as possible.
Some SP features I have run across that might be useful:
- Content organizer feature.
- Association forms.
- Declarative workflows.
Possible approaches I've considered:
A content organizer library that kicks off a workflow on submission. Not sure what the user experience for this would be like. Really hoping to keep to a single link -> Next -> Next -> Done kind of approach.
A declarative workflow with custom actions containing all the complexity.
An association form in front of the built-in document upload form for each library with a follow-on association form for calendar events.
Is this feasible and if so which approach is simplest?
I think I've come to my own conclusions on this. I've decided to go with a Drop Off library as part of the Content Organizer built-in feature (#1 above). This appears to be the simplest approach so far since I can do the majority through configuration in the Entity.xml files of the features. Many of the other methods I tried seems like they would require functionality not available in a Sandbox solution.
In order to achieve this, I defined site columns and added them to custom Document Type, then added this Document Type to all libraries. Using the Drop Off library, I can define rules to move the file based on one of the fields in the custom Document Type. I'm hoping to do any follow-up steps as a workflow that kicks off on the Drop Off library when a file is uploaded or as an Associated Form.

ecommerce using stripes

We have planned to start an e commerce project using Stripes + Hibernate.
Please let me know if it is good to have admin & user part in same project or two separate ones.
If it is a single project , how do i separate admin side code & user code.
for eg: if i have admin actions in com.ecommerce.adminactions pacakge and user actions in com.ecommerce.useractions package should i use dynamicmappingfilter to direct admin request to com.ecommerce.adminactions and user request to com.ecommerce.useractions ?
-http://myecommerce.com/admin/* - > should always go to com.ecommerce.adminactions
-http://myecommerce.com/ -> should go to com.ecommerce.useractions
or
Should i use #urlbinding(/admin/st.action) in each class (Hard code).
The requirement is they need multistore concept.
Please let me know your thoughts on this.Your thoughts & suggestions will be helpful
Thanks
The Stripes framework does not really influence decisions on how you should organize you're project, or how you should organize your IDE project structure, or even Java package structure or URL structure.
One or more project
Unless you have many developers, keep it all in a single project.
Package structure
A package structure should organize you're Java classes so that you put classes that are logically related (as defined by your architecture!) is in the same package. For example: com.ecommerce.action.admin and com.ecommerce.action.. See also: Properly package your Java classes
URL structure
Typically you want you're URL structure to reflect the logical structure of your website (not the same as your technical structure). To accomplish this, you should not rely on the default URL's but use #UrlBinding. With the annotation you do not hard code links, as all generated links will automatically use the UrlBinding pattern.
Multi store concept
For a multi store concept, you will need to build logic in your application for distinguishing between the different shops. For example by adding a shop id to your URL parameters. Or more sophisticated by detecting the (sub)domain name used and map that to a shop id (You can implement this by using an interceptor).