Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Bold text in description field of a custom plugin


#1

In the description field of my custom defect plugin I want to add a template so that all the testers enter defects in the same format. It would look like this.

Repro Steps:
1.
Expected Behavior:

Actual Behavior:

Correlation

How do I make the text bold? I’ve tried the ** before and after the text but that didn’t work.


#2

Try underscores - 2 of them on either side like this: this text will be bolded

__ this text will be bolded __ I added spaces so you can see the underscores.


#3

That didn’t work either. I’m trying to bold the text in the “prepare_field” function of my plugin.


#4

It did not work in the template (after the template is saved) or on a case created based on the template? I wonder if the template does not use the mark up but a case created based on the template would show the markup when the new case is saved.

Markup is not seen until the case is saved and viewed.


#5

It looks like when the push defect form is rendered it doesn’t use markup. If I enter a defect in my TFS and then view it in TestRail using the lookup, I see the bold text.

If I push the defect with the markup it gets save with the markup as text.


#6

Hi John,

This depends on TFS and how/whether it supports rich-text as part of a bug/issue. The __ or ** format is only used by TestRail and not necessarily by TFS and you would need to use the format of TFS to have text show up formatted in TFS. Or do you mean something else?

Cheers,
Tobias


#7

Tobias,

In the “prepare_field” function I have text in the description field that I want to be bold. This text is to prompt the testers to what needs to be included in the defect.

Repro Steps:
1.
Expected Behavior:

Actual Behavior:

Correlation:


#8

Hi John,

Once you pushed the issue, the text is displayed in TFS and not in TestRail so you cannot use TestRail’s rich-text format. I’m not sure if TFS supports a rich-text format you can use for this. If it does, you can pre-format the text in prepare_field according to the rich-text format of TFS and the defect plugin would push it to TFS like regular non-formatted text.

Cheers,
Tobias


#9

I want the text to display in the TestRail defect plugin as bold.


#10

Hi John,

Just to clarify this again: you want to have this in bold in TFS (after pushing an issue from TestRail with the Push Defect dialog), is this correct? You would then need to use the formatting capabilities that TFS provides and I’m not sure if TFS supports a simple rich-text format/syntax or just a word-like (WYSIWYG) editor.

Cheers,
Tobias


#11

No, I want the text in the plugin to be bold before pushing it to TFS. I have default text in the description field that I want to be bold.


#12

Hi John,

The text boxes wouldn’t support rendering text in bold in the form as these are just regular input fields. That said, as Tobias mentioned, if TFS has support for simple rich-text format/syntax, you could include this syntax in your default text for the description field and other fields as a type of template, and this would be pushed to TFS and rendered in TFS from there. Hope this helps!

Regards,
Marco


#13

Marco,

Now I have to figure out how to include the syntax for bold text for the push but not display it in the input field.

Thanks,
John