Trac 1.0.1 + How to link two custom fields - trac

I am using Trac 1.0.1 with agilo. In agilo, I have two custom fields say, "Application" and "AppType". Is there any way I can link the two custom fileds. For example:
If I select, App1 in the Application Filed, in the AppType Filed It should show only Type1 and Type3. If I Select App2 in the Application Field, only Type2 It should show in the App_Type Filed.

This kind of behaviour is implemented by the "chained fields" plugin: http://trac-hacks.org/wiki/TracTicketChainedFieldsPlugin

Related

How to find an issue with name of the fixed_version_id instead of the id ? (redmine)

I would like to find an issue in Redmine with some criteria (ex: name of the fixed_version_id, project_id, ...) but I still not able to find the syntax.
The issue I would like to find has :
a custom field = 113
an application like BAC
a project_id = 997
a fixed_version_id's name = 221200
I tried this :
https://redmine.xxx.com/issues.xml?cf_113=BAC&project_id=997&status_id=*&fixed_version_id[name]=221200
But it does not work. Could you tell me if it's possible please ?
Thanks
H.
I try to find a way to get an issue based on the name of the fixed_version_id instead of its id
With the issue query, you have to provide a version ID. The issue filters can not filter based on other attribites of the version.
You can however use the API to get a list of versions in the project:
https://redmnine.xxx.com/projects/997/versions.xml
Using this list, you can find the ID of your desired version and use this ID in the second request to get the issues for the version.
The APIs are documented on the Redmine wiki at
https://www.redmine.org/projects/redmine/wiki/Rest_Issues
https://www.redmine.org/projects/redmine/wiki/Rest_Versions

How to get Gerrit detail from change-id existing in different projects?

I would like to get change detail from change_id assume 123
Using GERRIT API:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change-detail
But In such a case it throws error:
HTTP Error 404: Not Found
!! CODE=404 !! None -> b'Multiple changes found for 123\n' # http://<GERRIT_SERVER>/a/changes/123/detail
The problem is that there are changes with same change_id in multiple projects.
Same command works properly when I try to get detail for change_id which exists only in single project.
Do you know some workaround for such a case?
Add the project to the search.
See the Gerrit documentation here.
{change-id}
Identifier that uniquely identifies one change. It contains the URL-encoded project name as well as the change number: "'~'"
Gerrit also supports the following identifiers:
an ID of the change in the format "'~~'",
where for the branch the refs/heads/ prefix can be omitted
("myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940")
a Change-Id if it uniquely identifies one change
("I8473b95934b5732ac55d26311a706c9c2bde9940")
a numeric change ID ("4247")

Prestashop 1.6 custom module how to add custom input and table in Configuration at Back Office

I am trying to create a custom footer module for my site, It is my first time to create a module in prestashop 1.6 and I read about this article
http://doc.prestashop.com/display/PS16/Adding+a+configuration+page
my problem is i cannot fully understand if I need to create a custom table for my module or not
Configuration::updateValue('FOOTERCUSTOM_NAME', $footercustom);
as you can see in this code, the Configuration table is already created and Configuration::updateValue is a default prestashop code
if I wanted to create a input 1 , input 2 and input 3 at our configuration page in module backoffice and it automatically output the data in the database at my hookfooter.
what is the proper way of doing this?
Note that I already succeeded in creating a basic module, my main problem in how to insert data on my database using the configuration in my module
You don't have to a create a custom table. With the Configuration::updateValue method you can store/update values in the ps_configuration table and you can retrieve these values with the Configuration::get and Configuration::getMultiple methods. Values can be removed with the Configuration::deleteByName method.
Example:
Configuration::updateValue('FOOTERCUSTOM_INPUT_1', $input1Stored);
$input1Retrieved = Configuration::get('FOOTERCUSTOM_INPUT_1');
You can refer to this guide as well, still valid
http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module#CreatingaPrestaShopmodule-ThegetContent()method

Grails - 2 domains and 1 form create/update/edit issues

Having some mega frustration set in.Maybe Im trying grails too much like rails and active record.
I have 2 domains.The parent is called 'report' and the child 'category'.
The user creates a new report and if they like they can add a category. The report can only have one category. However I would like to allow reports to be sorted by category or listed by category or even counted by category. Yes this column could go into the reports domain but I would like separation for future cases. so below I have my domains;
Domain 1 = Report
class Report
string reportname
string reportype
Domain 2 = category
class Category
Report report
string categoryname
I have 2 controllers, 1 for report 1 for category both with crud methods and no scaffold.
How do I set the view to create/edit/update the category domain while in the report _form?
I have read through the gorm docs, grails docs, others but still am stumbling on this.
Do I need to edit my report controller to handle the category domain? i.e import category and supply category def with each method for /edit/update/create.
Do I need to edit the report form to get the report params and pass this into a hidden field for the category name field so that when a save action is called the category domain commits the cat name and reportId.
Is my model all wrong? I have tried hasone, hasmany belongsto however I need to keep the category separate from the reports because I want to be able to show a page of reports separated by categories and allow only unique category names for a bunch of reports to reduce spelling mistakes in category names. i.e. I want to set a category name and associate it to a report.
New to grails so forgive me. Maybe I need to sit and have a beer and read more.
cheers
There are many ways to handle your scenario. One way to do this is to use redirect in your ReportController and pass in the params to CategoryController.

Drupal Views - Custom / Modded SQL

I am having an issue with the "Profile Checkboxes" module which stores custom profile fields comma separated.
The issue is if I create a view to filter by a value. The SQL result ends up being something like this:
...AND (profile_values_profile_interests.value in ('Business and Investment'))...
Which will not return any data since the value is stored like this:
"Business and Investment, Case Law, Labor Law, Tax Law"
I just need to adjust the SQL so that it is making sure the field contains the selected value
Is there anything I can do to adjust this?
For a 'quick hack' solution, you could try implementing hook_views_query_alter(&$view, &$query) in a custom module, check $view->name (and eventually also $view->current_display) to ensure you are dealing with the right view/display, and then manipulate $query as needed.
EDIT: Looks like the underlying problem has been addressed by the module maintainer in the meantime - see John's answer ...
I'm the creator and maintainer of Profile Checkboxes and thought you might be interested to know that the new version of the module now stores the values as serialized and includes Views support. The feature is available in the current release version.
Check out the Views modify query module.