Custom status in Mantis Bug Tracker - bug-tracking

I want to add a custom status to Mantis Bug tracker called "On Hold". Following some blogs I found online, I added the following lines to config_local.php:
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,55:onhold,80:resolved,90:closed';
$g_status_colors['onhold'] = '#cceedd';
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,55:onhold,80:resolved,90:closed';
However, when I go to assign this status to a bug, it displays as #55# in the drop down.
Any ideas why this might be?

See the Mantis reference on customising status values:
Define a constant to map the new status to.In a new file custom_constants_inc.php in the main mantisbt directory:
<?php define ( 'TEST', 60 ); ?>
Define the language strings required. This may need to be defined in several languages.In a new file custom_strings_inc.php in the main mantisbt directory:
<?php
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned, 60:to be tested,80:resolved,90:closed';
$s_to_be_tested_bug_button = "Issue Ready to Test";
$s_to_be_tested_bug_title = "Set Issue Ready to Test";
$s_email_notification_title_for_status_bug_to_be_tested = "The following issue is ready TO BE TESTED.";
?>
Define any configurations required.In the existing file config_inc.php in the main mantisbt directory:
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned, 60:to be tested,80:resolved,90:closed'; # Status color additions
$g_status_colors['to be tested'] = '#ACE7AE';
Add the status to any workflow defined in config_inc.php.

I am using MantisBT version 2.1.0 and had the same problem. The fix for me was to move the files custom_constants_inc.php and custom_strings_inc.php from the main mantisbt directory to the config directory.

Related

VdmComplex Changes Not Working with PATCH

Using the SAP B1 .edmx with 3.39.0 and trying to update DeliveryNotes with new DocumentPackages. However, the list of DocumentPackage that eventually gets passed by the execution of the update operation is empty.
Code:
var packagesUpdateDocument = new Document();
packagesUpdateDocument.setDocEntry(1);
var documentPackages = new ArrayList<DocumentPackage>();
var documentPackage = new DocumentPackage();
documentPackage.setNumber(10);
documentPackages.add(documentPackage);
packagesUpdateDocument.setDocumentPackages(documentPackages);
var updateDeliveryPackagesRequest = service.withServicePath("etc")
.updateDeliveryNotes(packagesUpdateDocument);
var updateDeliveryPackagesResponse = updateDeliveryPackagesRequest.tryExecute(serviceLayerDestination);
Looking at the logs of the service layer I can see this is the request which was eventually sent by the client:
PATCH /b1s/v2/DeliveryNotes(1)
{"DocEntry":1,"DocumentPackages":[{}],"#odata.type":"SAPB1.Document"}
From my understanding, PATCH requests will automatically disregard anything the generated client deems as 'unchanged.'
Printing the changed fields:
System.out.println(packagesUpdateDocument.getChangedFields());
Yields:
{
DocEntry=175017,
DocumentPackages=
[DocumentPackage
(
super=VdmObject(customFields={},
changedOriginalFields={}),
odataType=SAPB1.DocumentPackage,
number=10,
)
]
.....
}
I believe the Package is not recording the fields which have changed. Although I am not certain.
Is there a step I am missing or is this a feature gap?
As of SAP Cloud SDK 3.42.0 we support updating complex properties with PATCH out-of-the-box. See the release notes for more details.
Yes this is a feature gap currently. PATCH will only consider properties of the root entity and navigation properties while disregarding changes in complex properties.
Until that is supported updating with PUT instead via the .replacingEntity() option should work.

Is there a way to resolve this error: "CloudKit integration requires does not support ordered relationships."

I'm trying to use Apple's CoreDataCloudkitDemo app. I've only changed the app settings per their README document. On running the demo, I'm getting the error: "CloudKit integration requires does not support ordered relationships."
(The weird grammar in the title is included in the app)
The console log shows:
Fatal error: ###persistentContainer: Failed to load persistent stores:Error Domain=NSCocoaErrorDomain Code=134060 "A Core Data error occurred." UserInfo={NSLocalizedFailureReason=CloudKit integration requires does not support ordered relationships. The following relationships are marked ordered:
Post: attachments
There is the same error for the "Tags" entity.
I'm using Xcode 11.0 beta 4 (11M374r).
I've only changed the bundle identifier, and set my Team Id.
I removed the original entitlements file - no errors in resulting build.
I've not changed any code from the original.
Does anyone have a workaround, or preferably, a fix? Or did I do something wrong?
Thanks
Firstly, select CoreDataCloudKitDemo.xcdatamodeld -> Post -> RelationShips, select attachments relationship, on the Inspect panel, deselect Ordered, then do the same thing on the tags relationship.
Secondly, there will be some errors in the code now, because we unchecked the Ordered option, the property of attachments and tags in the generated NSManagedObject may changed from NSOrderedSet? to NSSet?. So we could change these error lines of code like below:
Origin:
guard let tag = post?.tags?.object(at: indexPath.row) as? Tag else { return cell }
Changed:
guard let tag = post?.tags?.allObjects[indexPath.row] as? Tag else { return cell }
Finally, you can run the code now. ;-)
Further more, on WWDC19 Session 202, the demo shows they set both attachments and tags relationships as Unordered, so I think there's something wrong in the given demo project.

How to remove Custom Properties from a SoapUI TestCase using Groovy?

I have created some list of properties under the TestCase. For example look at the following screenshot.
I tried to remove Testcase_Property property through the following groovy script teststep:
testRunner.testCase.testSuite.removeProperty( "Testcase_Property" );
when I reload the project, the Testcase_Property property is still exist in the Custom Properties tab when I click on the Test case name.
Anyone suggest me what the correct script to remove the custom properties in SoapUI.
Thanks
Karunagara Pandi
you can also use the following:
data = context.testCase.getTestStepByName("Test Case Name");
String[] propToRemove = new String[data.getPropertyCount()];
propToRemove = data.getPropertyNames();
for ( int i = 0 ; i < propToRemove.size(); i++ ){
data.removeProperty( propToRemove[i] );
}
Hope this helps.
Now you can remove more than one prop.
Finally I got the answers for removing Project, Testsuite and Testcase custom properties. Here are the scripts.
testRunner.testCase.testSuite.project.removeProperty( "Project_Level_Property" );
testRunner.testCase.testSuite.removeProperty( "Testsuite_Property" );
testRunner.testCase.removeProperty( "Testcase_Property" );
If any other way is there, please let me know friends.
Manual solution: use "Save Properties" and "Load Properties" from SoapUI
export the properties to a text file, e.g. customprop.txt
edit the file and delete the unwanted properties
import the file back into your soapUI project
in the "load properties" dialog check the option to "delete remaining"
Then the existing properties will be cleared out and replaced with your customprop.txt
Just for completeness:
Another quick but dirty and dangerous way is to modify the soapui-project.xml and remove the property nodes with a text editor.
Be aware that you can break your whole project if you do something wrong!
You should create a copy of your soapui-project.xml and do the following steps:
Set the values of the Properties you want to delete to deleteMe
Search for the string deleteMe in your soapui-project.xml
Delete the properties:
<con:property><con:name>name</con:name><con:value>deleteMe</con:value></con:property>

What to do when get "The model used to open the store is incompatible with the one used to create the store"?

I had a core data EntityDescription and I created data in it. Then, I changed the EntityDescription, added new one, deleted the old one using the editor for xcdatamodeld file.
Now any of my code for core data causes this error "The model used to open the store is incompatible with the one used to create the store}". The detail is below. What should I do? I prefer to remove everything in the data model and restart new one.
Thanks for any suggestion!
reason=The model used to open the store is incompatible with the one used to create the store}, {
metadata = {
NSPersistenceFrameworkVersion = 320;
NSStoreModelVersionHashes = {
Promotion = <472663da d6da8cb6 ed22de03 eca7d7f4 9f692d88 a0f273b7 8db38989 0d34ba35>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
);
NSStoreType = SQLite;
NSStoreUUID = "9D6F4C7E-53E2-476A-9829-5024691CED03";
"_NSAutoVacuumLevel" = 2;
};
Or if you're in dev mode, you can also just delete the app and run it again.
Deleting the app is sometimes not the case! Suggest, your app has already been published! You can't just add new entity to the data base and go ahead - you need to perform migration!
For those who doesn't want to dig into documentation and is searching for a quick fix:
Open your .xcdatamodeld file
click on Editor
select Add model version...
Add a new version of your model (the new group of datamodels added)
select the main file, open file inspector (right-hand panel) and under Versioned core data model select your new version of data model for current data model
THAT'S NOT ALL ) You should perform so called "light migration".
Go to your AppDelegate and find where the persistentStoreCoordinator is being created
Find this line if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error])
Replace nil options with #{NSMigratePersistentStoresAutomaticallyOption:#YES, NSInferMappingModelAutomaticallyOption:#YES} (actually provided in the commented code in that method)
Here you go, have fun!
P.S. This only applies for lightweight migration. For your migration to qualify as a lightweight migration, your changes must be confined to this narrow band:
Add or remove a property (attribute or relationship).
Make a nonoptional property optional.
Make an optional attribute nonoptional, as long as you provide a default value.
Add or remove an entity.
Rename a property.
Rename an entity.
Answer borrowed from Stas
If this is a non-production app, just delete your local database (appname.sqlite) and restart the app.
I find I'm always doing this, and so provide the following additional detail:
Under XCode 4 (4.3.2) you should find your datastore here:
/Users/~/Library/Application Support/iPhone Simulator/simulatorVersion/Applications/yourAppIdentifier/Documents
Or you can use Spotlight, if you first enable searching for System Files; I've found it fastest to save such a search to the menu bar.
If this is a non-production app, just delete your local database (appname.sqlite) and restart the app.
Delete your app on simulator and restart:
On simulator, go to Hardware -> Home:
Click and hold mouse button on your application icon:
Click on "X" in app icon to delete:
Go back to Xcode and restart your application(Command+R):
or:
PS.:
If the error appears again, review your code because the problem should be in the syntax or discrepancy between what you want to list with the data model that you have.
Reset your simulator and run again. If you were to run with a different device in the simulator, it would work. If you are running with an iphone 6s simulator and you try to run 6s plus, it would still work without resetting.
If running on a phone, make sure to delete the app and rerun it
I have faced the same issue using Xcode 7 beta 1 and the following action has resolved the issue.
Menu==>> click on Window>Projects>select project on the left hand side and click on delete button which is located on the right side.
If still doesn't work,
=> reset the simulator and run the app

Load content by id using Drupal6 Rules module

Would like to add files to a Drupal6 user's account based upon certain conditions (basically just upon new account creation). I want to use the Rules module to accomplish this but the conditional items don't seem to cover this action. Probably if you select the "Execute Custom PHP code" it is possible, but this out of my programming league. Any ideas welcome.
mmmm ok maybe u will find creating a new module is something difficult but its very easy..lets do it
1- go to /sites/all/modules
2- create new folder called when_user_login (lets called our new module when_user_login)
3- create inside this folder when_user_login.info include the following code
name = when user login
description = this module do something when user login
core = 6.x
4- now lets create a new file in the same directory called when_user_login.module include the following code
/**
* Implementation of hook_user().
* #see http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_user/6
* for more details
*/
function when_user_login_user($op, &$edit, &$account, $category = NULL) {
switch($op){
case 'insert' :
// now any code we will write here will be implemented when new user register
// you can access the new user information by {$account} variable
// E.g $account->uid include the id of the new account that register
break ;
}
}
good luck...hop that will help you (don't forget to enable the module)

Resources