Codes used in Mantis bug database - mantis

I am assuming these are the descriptions for the codes in the mantis_bug_table in the Mantis bug database.How can i confirm these descriptions ?
#Status ? Is it --> 10-New, 20-Acknowledged, 30-Confirmed, 40-Assigned,50-Resolved,60-Closed
#Severity ? Is it --> 10-FEATURE, 20-TRIVIAL, 30-TEXT, 40-TWEAK, 50-MINOR, 60-MAJOR, 70-CRASH, 80-BLOCK
#Priority ? Is it --> Urgent = 1, Not Urgent = 5, Disable = 0 . Default is 3

These are defined in config_defaults_inc.php and can be customized based on your requirements. Check the MantisBT Enum Strings in the above file.

Related

Wagtail 2.12 translations problem with wagtail_localize and StreamField

I am using wagtail built-in translations system with wagtail_localize.
For StreamFields with nested content, only external content is available for translation.
Look at this example:
class Carousel(blocks.StructBlock):
title = blocks.CharBlock(label='Titolo')
text = blocks.RichTextBlock(label='Testo')
items = blocks.ListBlock(blocks.StructBlock([
('tab_label', blocks.CharBlock(label='Testo visualizzato sulla tab')),
('title', blocks.CharBlock(label='Titolo')),
('text', blocks.RichTextBlock(label='Testo')),
('photo', ImageChooserBlock(label='Foto')),
('page', QuickPageLinkBlock(required=False)),
('color', NativeColorBlock(default="#085083", label = 'Colore per il titolo')),
]), label = 'Lista slide')
class Meta:
icon='snippet'
label = 'Carosello'
template = 'blocks/carousel.html'
Only title and text are available for translations, but not all the items.
I also need to translate items. How can i solve?
Moreover it seems that linked pages contained in snippets (in pages it works) cannot be translated, but I need to change the link to the correct language page.
Can someone help me?
Thanks,
Sabrina
I recommend using a StreamBlock instead of ListBlock for items.
The content of StreamBlock is translatable. I don't think ListBlocks can be translated yet (see here)
# Do not do this:
items = blocks.ListBlock(blocks.StructBlock(...))
# Do this instead:
items = blocks.StreamBlock([('item', blocks.StructBlock(...))])

How to apply lock on particular column in ruby on rails?

How to apply lock on particular field so the same number is not generate again.
I have created algoritham in which it create string with using Year+000..+integer number
example : "20150001","20150002","20150003" etc.
The problem is that when the multiple user request for that number at that time the same number generated.
Following function i call
def get_algo_number(model_name,prefix) <br>
year = get_year
if model_name.count > 0
last_number = model_name.last.number
if last_number[2..5].to_i > year.to_i
return create_number(year,prefix)
else
# if letest generated number already exist then generate new number
return last_number.next
end
else
return create_number(year,prefix)
end
end
Please help if you have any solution regarding apply lock.
Thanks
Yes, i resolved this problem by using multi-threading.

How to add page numbers to the header of a word document using Delphi xe5

I would like to be able to add the page numbers in a word document to the header.
I have found some links that display the code in visual basic, but no matter what i try, i keep getting errors. It keeps telling me the either "sections" or "headers" or "footers" is not a supported automation object.
Any help would realy be great. Thank You.
Links:
http://blogs.technet.com/b/heyscriptingguy/archive/2006/05/10/how-can-i-add-centered-page-numbers-to-the-footer-of-a-word-document.aspx
http://msdn.microsoft.com/en-us/library/office/ff194253(v=office.14).aspx
I Tried addapting the link's code with no success:
wrdDoc.ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).PageNumbers.Add
and if possible please how to allign the page number right.
Use [] instead of () for indexes
//Headers[wdHeaderFooterPrimary] = Headers[1]
//Add possible values:
//wdAlignPageNumberCenter = 1
//wdAlignPageNumberInside = 3
//wdAlignPageNumberLeft = 0
//wdAlignPageNumberOutside = 4
//wdAlignPageNumberRight =2
wrdDoc.Sections[1].Headers[1].PageNumbers.Add(1); //example with center alignment
wrdDoc.Sections[1].Headers[1].PageNumbers.Add(2); //example with right alignment

How do I disable Transformations in TYPO3 RTE Editor?

I created a custom extension for TYPO3 CMS.
It basically does some database queries to get text from database.
As I have seen, TYPO3 editor, transforms data before storing it in database so for example a link <a href="....." >Link</a> is stored as <link href>My Link Text</link> and so on for many tags like this.
when I query data from DB, I get it as it is stored in DB (<link href>My Link Text</link>)
so links are not displayed as they shoud. They display as normal text..
As far as I know there are two ways to go:
disable RTE transformations (how to do that?)
use lib.parseFunc_RTE (which i have no Idea how to configure it properly)
any idea?
thanks.
I guess you're not using Extbase and Fluid? Just as a reference, if you are using Extbase and Fluid for your extension you can render text from the RTE using Fluid:
<f:format.html>{bodytext}</f:format.html>
This uses lib.parseFunc_RTE to render the RTE text as HTML. You can also tell it to use a different TypoScript object for the rendering:
<f:format.html parseFuncTSPath="lib.my_parseFunc">{bodytext}</f:format.html>
Useful documentation:
parseFunc
Fluid format.html
I came across the same problem, but using EXTBASE the function "pi_RTEcssText" ist not available anymore. Well maybe it is, but I didn't know how to include it.
Anyway, here's my solution using EXTBASE:
$this->cObj = $this->configurationManager->getContentObject();
$bodytext = $this->cObj->parseFunc($bodyTextFromDb, $GLOBALS['TSFE']->tmpl->setup['lib.']['parseFunc_RTE.']);
This way I get the RTE formatted text.
I have managed to do it by configuring the included typoscript:
# Creates persistent ParseFunc setup for non-HTML content. This is recommended to use (as a reference!)
lib.parseFunc {
makelinks = 1
makelinks.http.keep = {$styles.content.links.keep}
makelinks.http.extTarget < lib.parseTarget
makelinks.http.extTarget =
makelinks.http.extTarget.override = {$styles.content.links.extTarget}
makelinks.mailto.keep = path
tags {
link = TEXT
link {
current = 1
typolink.parameter.data = parameters : allParams
typolink.extTarget < lib.parseTarget
typolink.extTarget =
typolink.extTarget.override = {$styles.content.links.extTarget}
typolink.target < lib.parseTarget
typolink.target =
typolink.target.override = {$styles.content.links.target}
parseFunc.constants =1
}
}
allowTags = {$styles.content.links.allowTags}
And denied tag link:
denyTags = link
sword = <span class="csc-sword">|</span>
constants = 1
nonTypoTagStdWrap.HTMLparser = 1
nonTypoTagStdWrap.HTMLparser {
keepNonMatchedTags = 1
htmlSpecialChars = 2
}
}
Well, just so if anyone else runs into this problem,
I found one way to resolve it by using pi_RTEcssText() function inside my extension file:
$outputText=$this->pi_RTEcssText( $value['bodytext'] );
where $value['bodytext'] is the string I get from the database-query in my extension.
This function seems to process data and return the full HTML (links, paragraphs and other tags inculded).
Note:
If you haven't already, it requires to include this file:
require_once(PATH_tslib.'class.tslib_pibase.php');
on the top of your extension file.
That's it basically.

DynamicUpdateCommand stops working after QlikView restart

I'm using DynamicUpdateCommand inside a macro in this way:
sub addOrder
set choosen = ActiveDocument.Fields("NUMORD").GetPossibleValues
for i = 0 to choosen.Count - 1
set result = ActiveDocument.DynamicUpdateCommand("UPDATE * SET CHOOSE = 'S' WHERE NUMORD = '" & choosen.Item(i).text & "' " )
if result = false then
MsgBox result.ErrorMessage
end if
next
end sub
Dinamic Data Update is enabled.
It works, but, when I close QlikView and reopen it, it doesn't work anymore. Even if try reloading.
I empirically realized that to make it work again I need to click the "Save" button, even without changing anything...
How can I solve this little issue? Maybe is it connected with RAM and way of saving .qvw file to the file system?
Many thanks!
Without any other solution I ended with this workaround, which saves the document programmatically on document opening:
Document Properties... > Triggers > Document Event Triggers > OnOpen > Add Action(s)... > Add > External > Run macro > set Macro name = reactivateDynamicUpdateCommand
Tools > Edit Module...: add this subroutine:
sub reactivateDynamicUpdateCommand
' I know, it's weird
'... but needed to reactivate DynamicUpdateCommand functionality after a restart
ActiveDocument.Save
end sub
It works, though a better solution would be preferred.
Starting from version 11 Dynamic Update can be done as Actions rather than through VB macro. It is preferable to use Actions when possible. However, sometimes even using Dynamic Update action I noticed freezes similar to what you described. I ended up adding one more dummy action right after Dynamic Update (e.g. assigning a value to dummy variable or adding Selection -> Back action to compensate triggering OnSelect).

Resources